SELECT * FROM PurchaseOrder WHERE PurchaseOrderID NOT IN ( SELECT PurchaseOrderID FROM PurchaseOrderDetail WHERE PurchaseOrderID IS NOT NULL )
Reason behind writing IS NOT NULL condition in Subquery is that It will evaluate the expression based truth tables.In NULL condition what will happen the expression is Unknown state. It will ignore other records also.
No comments:
Post a Comment