阿牛 - 专注.NET开发

如果梦想与实现之间有一道不可逾越的鸿沟,那么“执行力”就是跨越这道鸿沟的桥梁。

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
declare @null    varchar(1);
set @null = null;

if (@null is null)
begin
    
print 'is null always works not matter "ANSI_NULLS" variable ';
end

set ANSI_NULLS OFF
if (@null = null)
begin
    
print '= null works when "ANSI_NULLS" = OFF only';
end

set ANSI_NULLS ON
if  not exists(select 1 where @null =null)
begin
    
print '= null not works when "ANSI_NULLS" <> OFF';
end
posted on 2008-05-12 11:06  阿牛-专注金融行业开发  阅读(432)  评论(0编辑  收藏  举报