• you can use UNION also to do something similar. In this case, it returns both rows when there's a difference.

    SELECT*

    FROM(SELECT*

    ,count(1) OVER (PARTITION BY ID) AS versions

    FROM(SELECT*

    FROM#Source AS ss

    UNION

    SELECT*

    FROM#Target AS ss

    ) x

    ) y

    WHEREversions <> 1