You can use PIVOT operator to pivot the results from column-wise display to row-wise display. PIVOT is available in SQL 2005 and higher. However, in your example, you may not need to do that. A query like this should work. SELECT COALESCE(s1.id,s2.id) AS Id, s1.Name AS Table1Name, s2.Name AS Table2NameFROM (SELECT Id,Name,COUNT(*) AS S1Count FROM Table1 GROUP BY Id,Name) S1FULL JOIN (SELECT Id,Name,COUNT(*) AS S2Count FROM Table1 GROUP BY Id,Name) S2 ON s1.id = s2.id AND s2.Name = s2.NameWHERE ISNULL(S1Count,0) <> ISNULL(S2Count,0)