2010-08-02 64 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;