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
Post a Comment