时间:2022-05-01 09:15:27 | 栏目:Oracle | 点击:次
废话不多说了,直接给大家贴代码了,具体代码如下所示:
创建序列
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;
总结