創建序列 create sequence seq_student start with 6 increment by 1 maxvalue 500 nominvalue nocycle nocache; 創建觸發器 create or replace trigger trigger_student ... ...
創建序列 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;