Determine Oracle null == null

前端 未结 11 1888
栀梦
栀梦 2020-11-28 10:07

I wish to search a database table on a nullable column. Sometimes the value I\'m search for is itself NULL. Since Null is equal to nothing, even NULL, saying



        
11条回答
  •  甜味超标
    2020-11-28 11:05

    Use NVL to replace null with some dummy value on both sides, as in:

    WHERE NVL(MYCOLUMN,0) = NVL(SEARCHVALUE,0)
    

提交回复
热议问题