In fact, the RLIKE operator (a synonym for REGEXP) performs pattern matching of a string expression against a pattern.
RLIKE Pat_for_match
Here Pat_for_match is a pattern to be matched with the expression.
mysql> Select Id, Name from Student WHERE Name RLIKE 'v$'; +------+--------+ | Id | Name | +------+--------+ | 1 | Gaurav | | 2 | Aarav | | 20 | Gaurav | +------+--------+ 3 rows in set (0.00 sec)
Here, $ is a wildcard character used with the RLIKE operator, which will find students' names ending with "v".
The above is the detailed content of What is the use of RLIKE operator in MySQL?. For more information, please follow other related articles on the PHP Chinese website!