How do I set an empty set or null value to a default value like 1?
So far, I have this statement, but in case I get null values i want to handle that:
select case when count(*)=0
then 0
else 1
end OUTPUT
from TESTTBL
where timestamp = to_char(sysdate-1, 'yyyymmdd')||'0000';