• RLilj33 (2/26/2014)


    Equivalent to:

    SELECT X AS 'Intersecting'

    FROM A

    JOIN b ON b.y = a.x;

    Except the ordering. INTERSECT returns the values in numeric order; JOIN returns the values in the order in which they were found in the left table (A).

    I didn't see anything in the BOL documentation on this. Anyone shed some light on this? Thanks.

    And the performance is better using INTERSECT, even without adding an ORDER BY to your statement (to get identical record sets).

    Can someone explain the 'why' of the performance difference?