how to set a null value to default in oracle sql -


how set empty set or null value default value 1?

so far, have statement, in case null values want handle that:

select case when count(*)=0                     0                   else 1                     end output  testtbl  timestamp = to_char(sysdate-1, 'yyyymmdd')||'0000'; 

select case when exists                    ( select *                       testtbl                       timestamp = to_char(sysdate-1, 'yyyymmdd') || '0000'                    )             1             else 0        end output dual                      

edit

added from dual oracle not allow select without from clause.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -