IN Operator SQL

后端 未结 7 1555
庸人自扰
庸人自扰 2020-12-11 22:21

I have a table called NUMS with a single column n.
And I fill values 1,2,3,4,5,null in it.

Now a query

SELECT n FROM Nums 
 WHERE n IN (1, 2,         


        
7条回答
  •  忘掉有多难
    2020-12-11 23:04

    If an IN list contains a NULL value anywhere, the result of the entire list is UNKNOWN

    With the correct default of ANSI NULLS, when you compare NULL with NULL the result is not true, but UNKNOWN

提交回复
热议问题