Sometimes there is a need to select records from Table A where there are no corresponding records in Table B

e.g. If you have a products table with productid as primary key and you need to find products which did not get sold in a particular month from the sales table you can use following query

 

Leave a Reply

Your email address will not be published. Required fields are marked *