回覆列表
-
1 # othnz42639
-
2 # 我是阿嘛
select * from 表名 where xm not like "*小*"
select * from 表名 where xm "*小*"
select * from 表名 where not (xm="*小*")
select * from 表名 where xm not in ("*小*")
select * from 表名 where xm not like "*小*"
select * from 表名 where xm "*小*"
select * from 表名 where not (xm="*小*")
select * from 表名 where xm not in ("*小*")
SQL 語句使用LIKE、not like處理包含、不包含關係的方法一、SQL LIKE 運算子語法語句中的‘%’是萬用字元,表示任意字元select * from tt where test_column like "%d%"2、檢索test_column欄位開頭包含字元"d"的記錄select * from tt where test_column like "d%"3、檢索test_column欄位末尾包含字元"d"的記錄select * from tt where test_column like "%d"4、not like 即不包含檢索test_column欄位不包含字元"d"的記錄select * from tt where test_column not like "%d%"