Interview Questions

What does this WHERE clause evaluate to?

Microsoft SQL Server FAQs


(Continued from previous question...)

What does this WHERE clause evaluate to?

What does this WHERE clause evaluate to? (there are rows with NULL values)
select top 10 *
from MyTable
where Myid = NULL


Answer: Unknown

Explanation: The expression "MyID = NULL" evaluates to Unkown rather than any true or false condition.

(Continued on next question...)

Other Interview Questions