How to write this particular query?
How to handle two condition on a single column ? Suppose my query is like
SELECT * FROM mytable WHERE id = 'aa' AND ( title REGEXP 'foo' OR branch REGEXP 'bar')
I want to put condition on title
that it shoud not be of the pattern "test - /开发者_运维问答/ followed by any thing".
Thanks in advance.
Use NOT LIKE:
SELECT *
FROM mytable
WHERE title NOT LIKE 'test - %'
-- AND etc....
精彩评论