Select Items In Table A That Aren’t In Table B
↳ Added by admin → December 30, 2010 in MySQL. ⌈no comments⌋The following code select something from a table on the condition that the ID of the row in the table did not appear in another table.
SELECT table_a.id FROM table_a LEFT JOIN table_b ON table_a.id = table_b.aid WHERE table_b.aid IS NULL;
