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 '