Mega Code Archive

 
Categories / MySQL / Regular Expression
 

A regular expression matches anywhere in the string

mysql> mysql> SELECT 'abcdef' REGEXP 'abc'; +-----------------------+ | 'abcdef' REGEXP 'abc' | +-----------------------+ |                     1 | +-----------------------+ 1 row in set (0.00 sec) mysql> mysql> SELECT 'abcdef' LIKE 'abc'; +---------------------+ | 'abcdef' LIKE 'abc' | +---------------------+ |                   0 | +---------------------+ 1 row in set (0.00 sec) mysql>