当前位置: 代码迷 >> Sql Server >> 取不到空值?再现等解决马上给分解决方法
  详细解决方案

取不到空值?再现等解决马上给分解决方法

热度:72   发布时间:2016-04-27 16:53:23.0
取不到空值?再现等解决马上给分
declare   @m   smalldatetime
select   top   1   @m=QDate     from   qynotes   where   QUID=1
if   (@m=null)
print   'nono '

实际中where   [email protected]?什么不打印出nono。
更奇怪的是如果我写成if   (@m!=null)print   'nono '
[email protected]?我该如何判断!

如果where   QUID=1有记录一切都正常的!

------解决方案--------------------
if (@m is not null) print 'nono '
  相关解决方案