字符型字段里明明是空白的为什么判断还是有值

来源:百度知道 编辑:UC知道 时间:2024/05/18 03:30:36
字符型字段里明明是空白的为什么判断还是有值?

空白和<NULL>有什么区别?

在delphi里判断<NULL>是这样 if not <字段>.isnull then

那如何判断是空白的呢?

select * from 表名 where 字段名 is null
//否则字段名is not null
select * from 表名 where 字段名 =""

select * from 表名 where 栏名 is null

where 栏名=''这是空的

=""

IS NULL

不同吧

施主有所不知,空即是色,色即是空;对于某些类型的字段来说空白就是0,空就是空咯

NULL 不是空,NULL 是不确定

if not (<字段>.isnull or (<字段>.<>'' then

或:if length(字段)<1 then.................
我一般就是用这一种