postgresql – 如何匹配not null not empty?
发布时间:2020-12-13 16:15:55 所属栏目:百科 来源:网络整理
导读:我必须对凌乱的数据库进行一些查询.某些列填充空字符串或空字符串.我可以这样查询: select * from a where b is not null and b ''; 但这种情况有没有捷径? (匹配每个“非空”值)类似于: select * from a where b is filled; 只是: where b '' 会做你想
我必须对凌乱的数据库进行一些查询.某些列填充空字符串或空字符串.我可以这样查询:
select * from a where b is not null and b <> ''; 但这种情况有没有捷径? (匹配每个“非空”值)类似于: select * from a where b is filled;
只是:
where b <> '' 会做你想要的东西为null<> ”为null,不会返回该行 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |