我已经创建了一个序列:
create sequence mainseq as bigint start with 1 increment by 1
Run Code Online (Sandbox Code Playgroud)
如何将此序列用作列的默认值?
create table mytable(
id bigint not null default mainseq -- how?
code varchar(20) not null
)
Run Code Online (Sandbox Code Playgroud)