我有一個mysql選擇使用「不喜歡」在哪裏條件的問題。表中有15k條記錄。 3k條記錄在col1欄中的值爲'test'。mysql不喜歡不行不通
這個選擇優良工程:選擇
select
*
from
`table`
where
`col1` like 'test'
3000行。這是對的。
但如果我試試這個選擇:選擇
select
*
from
`table`
where
`col1` not like 'test'
0行,而我預計12000行。
我會感激任何想法嗎?
你可以在sqlfiddle做一個小例子嗎? – Barmar
不確定,但嘗試兩個不同的querry,像'col1 like'%test%''和'col1不是'%test%'' –
適合我使用:http://www.sqlfiddle.com/#!2/ 59eb8e/3 – Barmar