Please have a look at the tables below:
Customer Table:
ID
Name
Order Table:
ID
CustomerID
A customer can place 0,1 or many orders. Please have a look at the SQL query below:
SELECT Customer.*
FROM Customer LEFT JOIN Order ON Customer.ID=Order.CustomerID
WHERE CustomerID IS NULL
and
SELECT Customer.*
FROM Customer LEFT JOIN Order ON Customer.ID=Order.CustomerID AND
CustomerID IS NULL
Is there any difference between these two queries? When would a developer use one technique rather than the other?
I thought there would be other questions like this online, but I have not found the answer and hence the reason for the question.