如何配置Sequence?

来源:百度知道 编辑:UC知道 时间:2024/09/22 07:23:39
不要复制粘贴的。请注意素质!

是sequence???

建sequence seq_custid
create sequence seq_custid start 1 incrememt by 1;
建表时:
create table cust
{ cust_id smallint not null,
...}
insert 时:
insert into table cust
values( seq_cust.nextval,...)

你要说明是什么数据库啊?Oracle还是DB2?