I have two identical tables:
A : id1, id2, qty, unit B: id1, id2, qty, unit The set of (id1,id2) is identifying each row and it can appear only once in each table.
I have 140 rows in table A and 141 rows in table B. I would like to find all the keys (id1,id2) that are not appearing in both tables. There is 1 for sure but there can't be more (for example if each table has whole different data).
I wrote this query:
(TABLE a EXCEPT TABLE b) UNION ALL (TABLE b EXCEPT TABLE a) ; But it's not working. It compares the whole table where I don't care if qty or unit are different, I only care about id1,id2.