Home > Database > Mysql Tutorial > body text

What is the use of RLIKE operator in MySQL?

王林
Release: 2023-08-26 10:45:11
forward
1766 people have browsed it

What is the use of RLIKE operator in MySQL?

In fact, the RLIKE operator (a synonym for REGEXP) performs pattern matching of a string expression against a pattern.

Syntax

RLIKE Pat_for_match
Copy after login

Here Pat_for_match is a pattern to be matched with the expression.

Example

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) 
Copy after login

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!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!