Skip to content
Advertisement

Tag: coalesce

Best way to check for “empty or null value”

What is best way to check if value is null or empty string in Postgres sql statements? Value can be long expression so it is preferable that it is written only once in check. Currently I’m using: But it looks a bit ugly. stringexpression may be char(n) column or expression containing char(n) columns with trailing spaces. What is best way?

Advertisement