views:

12

answers:

1
SELECT title, title REGEXP 'apple' as is_fruit FROM mytable;

TO:

SELECT title, title REGEXP 'apple' or orange...or grapes...as is_fruit...

Basically, how do I do an "OR" for REGEXP?

+1  A: 
SELECT title, title REGEXP '(apple|orange|...)' as is_fruit FROM mytable;
zerkms