是这样的,如果数据表A中有5个数,(1,2,3,4,5)
我想查询出值不为3的其他值
换句话说就是查询出 "不满足我条件" 的所有的其他值
请教 取反 的SQL语句
答案:3 悬赏:70
解决时间 2021-02-21 21:37
- 提问者网友:刪除丶後
- 2021-02-21 07:38
最佳答案
- 二级知识专家网友:萌萌哒小可爱
- 2021-02-21 08:00
select * from 表名 where 字段名 not in (3)
全部回答
- 1楼网友:绝望伪装
- 2021-02-21 09:52
有这句话,sql引擎会对表格进行自然连接,where p.projno = a.projno.所以最终你select a的projno和b.projon是一样的,因为它俩 相等
- 2楼网友:你好陌生人
- 2021-02-21 09:20
可以用
select * from A where fieldname not like '3'
或者
select * from A where fieldname <>3
或者
select * from A where fieldname not in (3)
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯