3 回答

TA貢獻(xiàn)1784條經(jīng)驗(yàn) 獲得超8個(gè)贊
select 'true' where 3 = 1 or 3 = 2 or 3 = 3 or 3 = null
3 = 3
select 'true' where 3 <> 1 and 3 <> 2 and 3 <> null
ansi_nulls
3 <> null
ansi_nulls
3 <> null

TA貢獻(xiàn)1851條經(jīng)驗(yàn) 獲得超4個(gè)贊
3 = 1 or 3 = 2 or 3 = 3 or 3 = nullwhich is: FALSE or FALSE or TRUE or UNKNOWN which evaluates to TRUE
3 <> 1 and 3 <> 2 and 3 <> nullwhich evaluates to: TRUE and TRUE and UNKNOWN which evaluates to: UNKNOWN
select 'true' where 3 <> nullselect 'true' where not (3 <> null)

TA貢獻(xiàn)1877條經(jīng)驗(yàn) 獲得超1個(gè)贊
NOT IN
當(dāng)與未知值比較時(shí),返回0條記錄。
NULL
NOT IN
NULL
NULL
0
NULL
添加回答
舉報(bào)