let's say your two tables are called table1 and table2, and the column that they have in common is called columnx
this query compares the rows without a cursor --
Code:
SELECT table1.columnx
, table2.columnx
FROM table1
FULL OUTER
JOIN table2
ON table2.columnx = table1.columnx
ORDER
BY COALESCE(table1.columnx,table2.columnx)