• serg-52 (2/27/2015)


    Barcelona10 (2/26/2015)


    SELECT t1.*,t2.dueDate

    FROM Table1 t1

    LEFT JOIN Table2 t2 ON t1.ID = t2.ID

    WHERE t2.dueDate='2014-01-02'

    GO

    SELECT t1.*,t2.dueDate

    FROM Table1 t1

    LEFT JOIN Table2 t2 ON t1.ID = t2.ID

    AND t2.dueDate='2014-01-02'

    Quick word of caution, although a simple solution, it can lead to a rather inefficient execution plan compared to the ones where the set is pre-filtered, even for this small sample, the cost ratio is 1:4

    😎