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;
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;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货