I have a basic question. I want to return data from my table when the condition is true but when it is not I got the null row, but I don’t want that.
This is my example:
select case when coalesce(var, '') != '' then (select id from user) end
when var is not ” I got data, bat, when is not I, got null
Advertisement
Answer
Filter with a WHERE
condition:
select id from "user" where coalesce(var, '') = '';