A LEFT JOIN with a NULL check finds rows without a related record.
A LEFT JOIN with a NULL check finds rows without a related record. Predict the output before running the example.
SELECT c.customer_id,c.name FROM customers c LEFT JOIN orders o ON o.customer_id=c.customer_id WHERE o.order_id IS NULL ORDER BY c.customer_id;
What does today's SQL feature do, and when would you use it?
LEFT JOIN orders, then check o.order_id IS NULL.
Run the example, then modify one clause and predict how the result changes.
LEFT JOIN orders, then check o.order_id IS NULL.