在Sql2000中假设有这么一张表create table test( id int, name varchar(32), sex char)那么查询可以用select * from test where id is null or name is null or sex is null有些东西是不能为空的,所以LZ有很多字段的话可以挑选出那些可能为空的,其余在建立表时就应当设置为非空拉如果在Oracle中有个 nvl(exp1,exp2)函数,可以用来判断是否为空,如果exp1为空的话,则显示exp2中的字符select nvl(id,'空'),nvl(name,'空'),nvl(sex,'空') from name望能看到更好的办法.
|