ORACLE—plsql创建触发器语句

前端之家收集整理的这篇文章主要介绍了ORACLE—plsql创建触发器语句前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
create or replace trigger TIB_T_EXAM
  before insert on t_exam  
  for each row
declare
   integrity_error  exception;
    errno            integer;
    errmsg           char(200);
    dummy            integer;
    found            boolean;
begin
    --  Column ID uses sequence SEQ_T_EXAM
    select SEQ_T_EXAM.NEXTVAL INTO :new.ID from dual;


--  Errors handling
exception
    when integrity_error then
       raise_application_error(errno,errmsg);
  
end TIB_T_EXAM;
原文链接:https://www.f2er.com/oracle/212871.html

猜你在找的Oracle相关文章