To find non-matching rows between two tables A & B whose PK is a composite key of three cols, I use the query -
SELECT DISTINCT A.*
FROM Table1 A
INNER JOIN Table2 B
ON A.[Col1] <> B.[Col1]
AND A.[Col2] <> B.[Col2]
AND A.[col3] <> B.[col3]
I need the non-matching rows of Table A only. My question is - Is the above query correct? Any better way to find non-matching rows of A.
Thanks