eg:select length(trim('xx')) from 表 , xx字段的长度为 20,或者 为空('')
我想过滤条件为 length('xx') = 0 .select * from 表 where length(trim('xx')) < 1 为什么一条数据也查部出来。明明我知道有数据符合条件。求帮助
我想过滤条件为 length('xx') = 0 .select * from 表 where length(trim('xx')) < 1 为什么一条数据也查部出来。明明我知道有数据符合条件。求帮助
--第一,你的xx不要加'',否则会认为为字符串xx,第二length空为null,不为0
with t(xx) as(
select ' ' from dual
union all select 'x ' from dual
)
select * from t where length(trim(xx)) is null;