Skip to content

The NOT IN that returns nothing

This returns zero rows, although many customers have never ordered:

sql SELECT * FROM customers WHERE id NOT IN (SELECT customer_id FROM orders);

Why?