2010-08-02 65 views
0
SELECT title, title REGEXP 'apple' as is_fruit FROM mytable; 

TO:如何在MYSQL中修改此查询?

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

基本上,我怎么做一个 “OR” 为REGEXP?

回答

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