大师们,SQL语句,不包括,怎么写 查找列数据不包括,xx 以及xx

来源:百度知道 编辑:UC知道 时间:2024/05/04 12:36:44

select * from Table where column not in ('Str1',int1)

查找某1列数据不包括'XX'并且不包括'YY'的记录:
select * from tablename where 查找列 not like '%xx%' and 查找列 not like '%yy%'

select * from tablename where col not in ('data1','data2',...)

not exists
或者not in
推荐用Not exists 相比not in效率高