1.创建序列:
create sequence your_seq
nocycle
maxvalue 9999999999
start with 1;
2.使用触发器实现自增:
create or replace trigger your_seq_tri
before insert on your_table1 for each row
declare
next_id number;
begin
select your_seq.nextval into next_id from dual;
:new.id := next_id;
end;