SyntaxFix
Write A Post
Hire A Developer
Questions
You can create a function to make this easy.
create function IFEMPTY(s text, defaultValue text) returns text deterministic return if(s is null or s = '', defaultValue, s);
Using:
SELECT IFEMPTY(field1, 'empty') as field1 from tablename