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;

相关文章

文章浏览阅读773次,点赞6次,收藏9次。【代码】c# json字符...
文章浏览阅读8.7k次,点赞2次,收藏17次。此现象一般定位到远...
文章浏览阅读2.8k次。mysql脚本转化为oracle脚本_mysql建表语...
文章浏览阅读2.2k次。cx_Oracle报错:cx_Oracle DatabaseErr...
文章浏览阅读1.1k次,点赞38次,收藏35次。本文深入探讨了Or...
文章浏览阅读1.5k次。默认自动收集统计信息的时间为晚上10点...