Oracle触发器实例
# 触发器
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;
posted on
2018-09-22 16:33
小小疯子1
阅读(579)
评论(0)
编辑
收藏
举报