TSQL query to select all records from Customer that has an Order and also select all records from customer that does not have an Order. The table Customer contains a primary key of CustomerID. The table Order contains a primary key of OrderID and a foreign key of CustomerID.
Share
I came up with this solutions.
/* NOT IN instead of IN will give the other customers who doesn’t have an Order */