1.update token_billdetail set TOKENSTATUS =1,ACTIVITIME=sysdate  where TOKENBILLNO='YH110513000020'2.create or replace trigger tr after insert or update or delete
on token_billdetail
begin 
if updating then 
dbms_output.put_line('update');
end if;
if inserting then
dbms_output.put_line('insert');
end;上面第一句数据库执行语句是更新一景点编号的优惠劵 优惠劵可以永久使用 
第二句是更新语句的触发器脚本语句 请问这两句有错误吗?

解决方案 »

  1.   

    也就是如何写更新语句的触发器?CSDN没人会吗
      

  2.   

    第二个if语句没有结束额。
    这个逻辑可以用if..then.. elsif then .. else .. end if来实现,没必要所有的情况都判断两次吧。
      

  3.   


    出现这个错误什么意思啊
              begin case declare end exception exit for goto if loop mod
              null pragma raise return select update while with
              <an identifier> <a double-quoted delimited-identifier>
              <a bind variable> << continue close current delete fetch lock
              insert open rollback savepoint set sql execute commit forall
              merge pipe purge
    ÐУº6
    Îı¾£ºend if;