NULL,表示不明确、未知的列值
测试表:testnull(id varchar(32))
数据库:Sybase ASA11.0
行数据(''), (NULL)
数据库选项ansinull为true(也是ASA数据库的默认选项)时,
select * from testnull where id = null
select * from testnull where id != null
结果均为空
select * from testnull where id is null
结果为(NULL)
select * from testnull where id is not null
结果为('')
当ansinull为false时,
select * from testnull where id = null
结果为(NULL)
select * from testnull where id != null
结果为('')
从上述结果来看,NULL值确实是一个有争议的东西,但是,毫无疑问,ansinull对NULL的定义是精确的,即不能对NULL值进行等于或不等判断,无论是等还是不等