废话不多说了,直接给大家贴代码了,具体代码如下所示:
创建序列
create sequence seq_student start with 6 increment by 1 maxvalue 500 nominvalue nocycle nocache;
创建触发器
create or replace trigger trigger_student before insert on student for each row declare begin select seq_student.nextval into :new.id from dual; end;
总结
以上所述是www.887551.com给大家介绍的oracle数字类型number自增的实现代码,希望对大家有所帮助