select * from xxx where xx not in {select xx from xxx1} , 如果查出子集为空,则主表中所有都满足条件,即查出所有数据, 在 做 的 ”delete 时要特别 加小心
select * from student3 where stud_id not in (select A3 from [Table_1] )
如果xx中包含null, 因为 !=null 总为false, 所以将查出的数据为 空
1. not in : 得返回true 3!=2 true && 3!=3 false && 3!=null false 3 =={3,4,5,null}
2=={3,4,5,null} 2!=3 true && 2!=null false
2. in : 得返回true 3==3 true, 3==1 false , 3==null false
3. where 1!=1 : 集合中找符合条件的数据 ,比如 id=3 , 如果为”false " 则没有满足条件的数据