WHERE not regex in SQL 1

WHERE not regex in SQL

SELECT FirstName FROM intque.person_tbl WHERE FirstName NOT REGEXP '^[aeiou].*ok$';

Here is what the above code is Doing:
1. We’re selecting the FirstName column from the person_tbl table.
2. We’re using the NOT REGEXP operator to find all the names that don’t start with a vowel and end with ok.
3. We’re using the ^ character to indicate the beginning of the string.
4. We’re using the .* character to indicate that any character can be in between the vowel and ok.
5. We’re using the $ character to indicate the end of the string.

Similar Posts