Here's my table.

When I execute the below query using NOT IN it gives me namal and Ann.
SELECT firstname
FROM info.student_info
WHERE firstname NOT IN (SELECT firstname
FROM info.student_info
WHERE lastname IS NULL)
But when I execute the below query using NOT EXISTS it gives me no rows.
SELECT firstname
FROM info.student_info
WHERE NOT EXISTS (SELECT firstname
FROM info.student_info
WHERE lastname IS NULL)
Why is this? I have researched some areas on NOT IN and NOT EXISTS, but couldn't find an answer for this.
lastname IS NULL.NULL, but yourNOT INalready filters outNULLs. @wildplasser accurately points out the difference.