当前位置:Gxlcms > 数据库问题 > oracle设置id自动增长

oracle设置id自动增长

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

sequence 序列名 minvalue 1 maxvalue 99999999999999999999 start with 1 increment by 1 nocache

2、创建触发器(关联表字段和序列)

create or replace trigger 触发器名
before insert on 表名
for each row 
    begin 
        select 序列名.nextval into:new.表字段 from dual;
    end;

 

oracle设置id自动增长

标签:nocache   tar   bsp   rac   style   code   序列   seq   oca   

人气教程排行