Skip to content

RLIKE

SELECT * FROM Employees
WHERE Name RLIKE '^[A-C]';
| ID | Name | Age |
|----|--------|-----|
| 1 | Alice | 25 |
| 2 | Bob | 30 |
| 4 | Carlos | 28 |

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.