Previous | Home | Next |
They are the chararcters which provides a easiy way to search any pattern or string in the specified column. Wildcards can be use within two functions only, they are
- Like
- Rlike
The Like is already discussed in the previous page or you can click on this link
Rlike
It performs some category , whose description is given below in the below table
Type | Description |
^ | Define begining of the string |
$ | Define ending of the string |
| | OR Conditions |
Syntax
SELECT * FROM tablename WHERE Clause RLIKE 'type_define';
The '^' defines the starting of the string followed by the character ' s ' define and display all the result.
Example
SELECT * FROM studinfo WHERE lname RLIKE '^s' ;
The '$' defines the ending of the string followed by the character ' a ' define and display all the result.
Example
SELECT * FROM studinfo WHERE lname RLIKE 'a$' ;
The '|' defines the OR type in the string and display all the result.
Example
SELECT * FROM studinfo WHERE lname RLIKE 'sharma|saxena' ;
Previous | Home | Next |