Question: How do I
make a column default to the nextval of an Oracle sequence?
Answer: Oracle 12c has a new default value
syntax for columns that allows you to specify the default
for a column to be an Oracle sequence.
Here is a
syntax example showing the use of the default sequence:
create sequence
default_seq
increment by 1 start with 1;
create sequence default_if_null increment
by 1 start with 1;
create table
test1
(
keycol number
default default_seq.nextval,
seckey number
default on null
default_if_null_seq.nextval,
. . .
);