第一步:
建两个查询:
创建序列:seq_t_dept
为序列名
create sequence seq_t_dept
minvalue 1
maxvalue 99999999
start with 1
increment by 1
cache 50
创建自增:T_USER
为表明ID
为列名
create or replace trigger "dept_trig"
before insert on T_USER
for each row
declare
begin
select seq_t_dept.nextval into :new.ID from dual;
end dept_trig;