7 replies
by oliviu
Having 2 tables A and B, to get the rows from table A which don't exist in table B and those from table B which don't exist in table A run this:
(select * from A minus select * from B)
union
(select * from B minus select * from A);
Good Lock
by shanrali
by glen_mcleod
Try this one, it's a little more straightforward.
Select *
From A Left Join B on B.CommonColumn = A.CommonColumn
Where B.CommonColumn Is Null
"CommonColumn" refers to the name of the column that is common to both tables.
Glen
by shanrali
SELECT column name FROM table A
WHERE NOT EXISTS
(SELECT column name FROM table B
WHERE A.column name = B.column name)
or
SELECT DISTINCT column name
FROM table A
WHERE column name NOT IN
(SELECT column name
FROM table B)
by shanrali
by shanrali
This discussion is closed to new replies.
Trending Networks posts
Sort by Trending