A and B的反义 ! A or !B 错!!
要找到 !A 和!B的交际 !A or !B 而不是 !A and !B
!A or !B == !(A and B)
举例:
select * from TABLE2 t
-- where (id,fc) not in ((1,'PEK'),(1,'WUH'))
-- where id != 1 or FC not in ('PEK','WUH')
-- where (id,fc) not in ((1,'PEK'),(1,'WUH'))
-- where id != 1 or FC not in ('PEK','WUH')
--where id!=1 and FC not in ('PEK','WUH')
id FC
1 PEK
1 XXX
2 PEK
3 WUH
4 WUH
前两个答案一样,都是删除两个条件同时满足的。第三个删除任一条件。