select e.* from dbo.Employee e, dbo.Dependent d where e.ID *= d.ID and d.ID and d.ID is nullUnfortunately, the above fails returning all employee records. This is because d.ID is null is evaluated first, before the join condition, and since none of the Dependent records has ID is null, all records are eliminated and therefore, all employee records are returned. Restating it properly with left join works as expected of course.
17 People are following this question.