It turned out to be easy enough:
create table mytable (
id bigint not null constraint DF_mytblid default next value for mainseq,
code varchar(20) not null
)
or if the table is already created:
alter table mytable
add constraint DF_mytblid
default next value for mainseq
for id
(thank you Matt Strom for the correction!)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…