• Thanks for the question.

    There is one thing not mentioned in the explanation, but very important to keep in mind: the INTERSECT statement and the SELECT #4 do not always return the same results. If both tables #A and #B contain NULL values, the INTERSECT statement will return a NULL value in the result set, while the SELECT #4 won't.

    This behavior is documented in Books Online (http://msdn.microsoft.com/en-us/library/ms188055.aspx)

    EXCEPT and INTERSECT (Transact-SQL)

    Remarks


    When you compare rows for determining distinct values, two NULL values are considered equal.