标签:begin seq start acl oracle触发器 rop row cycle alt
# 触发器
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;
标签:begin seq start acl oracle触发器 rop row cycle alt
原文地址:https://www.cnblogs.com/zhuyafeng/p/9690417.html