NULL不是数值

declare @alive bit;
set @alive = null;

if @alive = 1 or @alive != 1
print 'Alive or Dead';
else
print 'Huh? Neither alive nor dead';

if @alive=@alive
PRINT 'It must equal itself, right?'
ELSE
PRINT 'Not always. null does not equal null';

代码挺有意思的,并且把NULL是什么解释的很清楚,写供大家参考一下。

posted @ 2011-12-28 16:05  _cc  阅读(188)  评论(0编辑  收藏  举报