标签:
1、创建序列
create sequence sequence_userinfo
start with 1
increment by 1
minvalue 1
maxvalue 999999
nocycle
nocache
noorder;
2、创建触发器
create or replace trigger userinfo_trigger
before insert on userinfo
for each row
begin
select sequence_userinfo.nextval into:new.id from sys.dual;
end;
标签:
原文地址:http://www.cnblogs.com/jhc-blog/p/5790961.html