not in能不能用于多个字段 如题 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你可以分开写或者用NOT EXISTS代替~ 不能不过可以这样 select * from A where col1+col2 not in (select col1+col2 from B) 不能同时用多个字段只能这样:where col1 not in (select col1 from ...)and col2 not in (select col2 from ...) 因为:一个字段 not in 多个值 可以一个值 not in 多个字段 不可以所以:not in 不能用于多个字段。 where b not in ('bbb') or c not in ('bbb')---这种?》 where b not in ('bbb') or c not in ('bbb')----就是换了,一种 写法! 用not existsselect m.* from m where not exists(select 1 from n where id = m.id and code = m.code ....) CHECKSUM或者NOT EXISTS都可以 dateadd增加毫秒过大溢出 mysql每个月自动创建一张表,以年月做为表名,如何进行联合查询? SQL查询语句 取某字段内不重复的记录有多少个,该怎么写? 触发器不触发的原因如何分析? 触发器,for 和 after 有区别吗? sql 语句查询一段日期 如果SQL数据库已经形成,那么如何进行调用呢? SQL几种连接查询的区别是什么,能举例说明吗? 如何对整个数据库加密? 行列互换的疑难查询!!!!!!!!! 请教一个离当前时间三天之内数据的SQL语句 怎样在同一行显示最大值和最小值?
或者用NOT EXISTS代替~
where col1 not in (select col1 from ...)
and col2 not in (select col2 from ...)
一个字段 not in 多个值 可以
一个值 not in 多个字段 不可以
所以:
not in 不能用于多个字段。
where b not in ('bbb') or c not in ('bbb')
---这种?》
where b not in ('bbb') or c not in ('bbb')----
就是换了,一种 写法!