????3.1 Not In??null
?????????????????У?where????????not in???????????where??????????OrderStatus not in ('Active'??'InActive')????????????????а???orderstatus?'Not Active'??'NULL'?????е??????
????select * from orders where OrderStatus not in ('Active'??'InActive')
???????????У???OrderStatus?null??? ?where???????where null <>'Active' AND  null<>'InActive'?????????????н????????????null??????where???ж???????null????????в?????????????С?????OrderStatus?'Not Active'???????where?????true????????????????????С?
????????????????????С?

?????????in??null???????????
????3.2 Not exists??null
?????????????????????????а???orderstatus?'Not Active'??'NULL'?????е???????????Not exists??
?????????????У??????????OrderStatus='Active' or  OrderStatus='InActive???У???????????not exists??????????????????μ???????????????С?
????SELECT *
????FROM orders AS o1
????WHERE NOT EXISTS(
????SELECT *
????FROM orders AS o2
????WHERE o1.OrderStatus = o2.OrderStatus
????AND ( o2.OrderStatus = 'Active'
????OR o2.OrderStatus = 'InActive'
????));

????????????????????????д??????????????
????select * from orders as o2 where  o1.OrderStatus=o2.OrderStatus and (o2.OrderStatus='Active' or  o2.OrderStatus='InActive' ))
??????д???
????SELECT *
????FROM orders AS o2
????INNER JOIN orders o1 ON o1.OrderStatus = o2.OrderStatus
????AND ( o2.OrderStatus = 'Active'
????OR o2.OrderStatus = 'InActive'
????);
????????????????

?????????????????????
????????????????not exists????orders???в?????????????????У?????????orders???????????????е??з???true????????false????д?????????????unknown?????????
????????????????orderID?3??4???в??????????????У????not exists?ж??true????orderID?1??2??????????????????????У?????not exists?ж??false???????where??“????true?????false??null”??????????orderID?3??4??????????????С?


?????????exists??null???????????
????3.3 Not  in??Not exists??????
????not in??????????????????????????????true|false|unknow??????????
????not exsits?ж??????????????????????????????????????unknown?????????????not in?????not exists?????true??false????????????
???????
?????????????null?????????е???壬?????SQL?????????????null?????????????????????дSQL??????????????????????д??????????null????????????????????????????