NOT IN with a NULL in the list
What does this query return?
-- customers: id 1, 2, 3 -- banned: customer_id 2, NULL SELECT id FROM customers WHERE id NOT IN (SELECT customer_id FROM banned);
Discussion 0
Join free to post in the discussion.
Related questions
- Stopping SQL injectionBackend Developer
- Purpose of a database indexBackend Developer
- Rows returned by a LEFT JOINBackend Developer
- What a foreign key enforcesBackend Developer
- Atomicity in a money transferBackend Developer
- What a 504 from Nginx meansBackend Developer
- COUNT and AVG with NULLsBackend Developer
- Filtering grouped resultsBackend Developer