SQL_NuB (3/20/2013)
the values that are different so for exampleif Active is true in DB2 and now coming in as FALSE in DB1, I need that.
as for NULL values, I never thought, how can I handle those?
Single fixed query can only select the same fixed number of columns.
As you select all columns from both ends, so you will get all values.
Nulls can be values by different ways. Most robust and neat one would be:
WHERE NULLIF(t1.Col1,t2.Col1) IS NOT NULL OR NULLIF(t2.Col1,t1.Col1) IS NOT NULL
OR NULLIF(t1.Col2,t2.Col2) IS NOT NULL OR NULLIF(t2.Col2,t1.Col2) IS NOT NULL
OR ...