RLIKE
expr RLIKE pat
Section titled “expr RLIKE pat”Example
Section titled “Example”SELECT * FROM EmployeesWHERE Name RLIKE '^[A-C]';Output
Section titled “Output”| ID | Name | Age ||----|--------|-----|| 1 | Alice | 25 || 2 | Bob | 30 || 4 | Carlos | 28 |Explanation
Section titled “Explanation”In the SQL statement provided, the RLIKE operator is used in a WHERE clause to filter rows containing names that start with any letter between A and C. The regular expression ’^[A-C]’ denotes matching any string that starts(^) with any of the letters A, B, or C. The output of the query contains only the rows where the Name column satisfies this condition.