I want to do an EXCEPT/MINUS in MySQL. If primary keys were available, the obvious solution would be:
SELECT
*
FROM
table_a AS a
WHERE
a.ID not in(
SELECT
b.ID
FROM
table_b AS b
)
However, what if I don't have a key column and I want an actual set difference, i.e. taking into account all (possibly many) columns?
I want something like
SELECT * FROM table_a WHERE * NOT IN …
This isn't possible of course. I can't assign an entire row to a variable, can I? Any ideas?