如何在MYSQL中修改此查询?

时间:2010-08-02 04:52:06

标签: mysql database regex

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

TO:

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

基本上,我如何为REGEXP做“OR”?

1 个答案:

答案 0 :(得分:1)

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