当前位置:Gxlcms > 数据库问题 > oracle 自增

oracle 自增

时间:2021-07-01 10:21:17 帮助过:4人阅读

create sequence SEQ_name
minvalue 1 --最小值
nomaxvalue --不设置最大值
start with 1 --从1开始计数
increment by 1 --每次加1个
nocycle --一直累加,不循环
nocache;

CREATE or replace TRIGGER "tiger_name" BEFORE
INSERT ON 表名 FOR EACH ROW
begin
select SEQ_name.nextval into :new.ZID from dual;
end;

oracle 自增

标签:value   next   tar   with   nbsp   nocache   star   最大值   art   

人气教程排行