Friday, 27 April 2012

Demonstrate default column values


drop table x
-- /
 
create table x (a char, b number default 99999, c date, d varchar2(6))
/
 
alter table x modify (c date default sysdate)
/
 
insert into x(a, d) values ('a', 'qwerty')
/
 
select * from x
/
 
--
-- Expected output:
--
--  A          B C           D
--  - ---------- ----------- ------
--  a      99999 25-APR-2001 qwerty
-

No comments:

Post a Comment