如何匹配not null + not empty?

rap*_*2-h 9 postgresql postgresql-9.5

我必须对凌乱的数据库做一些查询.有些列填充了null空字符串或空字符串.我可以这样查询:

select * from a where b is not null and b <> '';
Run Code Online (Sandbox Code Playgroud)

但这种情况有没有捷径?(匹配每个"非空"值)类似于:

select * from a where b is filled;
Run Code Online (Sandbox Code Playgroud)

Clo*_*eto 16

只是:

where b <> ''
Run Code Online (Sandbox Code Playgroud)

将执行您想要的操作为null <> ''null,并且不会返回该行