NULL values are excluded. Why?

前端 未结 4 1850
谎友^
谎友^ 2020-12-16 11:47

This is about a bizarre behaviour I found in Microsoft Sql Server. Please correct me if I\'m wrong.

SELECT COUNT(*) FROM TABLEA 
WHERE [Column1] IS NULL;
         


        
4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-16 12:11

    Best answer would be just to use below condition in where clause

    ISNULL(t1.[Column1],'') NOT IN ('Cross/Up sell', 'Renegotiation', 'Renewal')

提交回复
热议问题