本帖最后由 priestmoon 于 2010-04-07 10:56:49 编辑

解决方案 »

  1.   

    create or replace trigger t_emp_insert
      before insert on   emp
     -- for each row
    declare
       err Exception;
    begin
      if inserting then
        raise err;
      end if;
      exception
        when err then
          dbms_output.put_line('dddd');
    end t_emp_insert;err没有定义
      

  2.   

    1.Oracle有两种异常的处理方式: 系统异常 自定义异常       2.自定义异常  语法结构:
         异常名1 Exception;
         …
         if 条件 then
           raise 异常名1; (--raise err;)
         …
         Exception
         when 异常名1 then
           异常处理段;3.上述问题由err异常变量未定义引起