Regex or Regular Expression in Sql
by Mohan[ Edit ] 2014-07-10 13:06:17
Regex or Regular Expression in Sql
Sql allows to use regular expressions in query.
You can use a regular expression in the select query as follows:
SELECT lastname, firstname FROM persons WHERE lastname REGEXP '^(a|b|c)';
This select query retrives lastname,firstname with lastname starting with a or b or c.