• The best way to think about it as "NOT EXISTS". This is the most logical human approach. You can always convert "not exists" into "left join"

     select s.* from #students s

    where not exists

    (

    select 1 from #StudentExam where stid=s.stid and Examname='SQL Server'

    )