寻求高效的代码,如果选出一个字符型字段中为空串,或为空格,或为null的所有记录,一句代码
----------------------
我能想到的以下几句,不知哪句好,有没有更好的。
select * from 表名 where isnull(字段名,'')=''
select * from 表名 where len(isnull(字段名,''))=0
----------------------
我能想到的以下几句,不知哪句好,有没有更好的。
select * from 表名 where isnull(字段名,'')=''
select * from 表名 where len(isnull(字段名,''))=0
---------
不是只选null的记录,还要同时选出为空串的,为全角空格的,为半角空格的
print '|'+rtrim(' ')+'|'
from table
where field in ('',' ',null)