DEFAULT column values

>>Script Language and Platform: SQL
To avoide ARC_Triggers creation, you
can use DEFAULT column values.

Author: Paul Nersesov



drop table abc_test;
create table abc_test (
col_id number,
col_1 number default 99999,
create_date date default sysdate,
create_user varchar2(30) default user
);
insert into abc_test(col_id) values (1);
select * from abc_test;
/*
COL_ID COL_1 CREATE_DA CREATE_USER
———- ———- ——— ————
1 99999 21-APR-08 PNERSESOV
*/



Disclaimer:
We hope that the information on these script pages is
valuable to you. Your use of the information contained in these pages,
however, is at your sole risk. All information on these pages is provided
“as -is”, without any warranty, whether express or implied, of its accuracy,
completeness, or fitness for a particular purpose…

Disclaimer Continued

Back to Database Journal Home

Latest Articles