时间:2021-07-01 10:21:17 帮助过:32人阅读
# 触发器
create or replace trigger tr_tmp
before insert on emp
for each row
begin
select empno_seq.nextval into :new.empno from dual;
end
insert into emp(ename,deptno)
values(‘南昌‘,20);
# 序列,---序号生成器
select empno_seq.nextval from dual;
select empno_seq.currval from dual;
# 修改序列
alter sequence empno_seq increment by n
start with n
maxvalue n | nomaxvalue
minvalue n | nominvalue
cycle | nocycle
cache n | nocache
# 删除序列
drop sequence empno_seq;
Oracle触发器实例
标签:begin seq start acl oracle触发器 rop row cycle alt