日期:2014-05-17  浏览次数:20580 次

求Oracle高手帮忙指点迷津 谢谢了
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;

上面第一句数据库执行语句是更新一景点编号的优惠劵 优惠劵可以永久使用 
第二句是更新语句的触发器脚本语句 请问这两句有错误吗?

------解决方案--------------------
有没有错误,你执行一下试试不就知道了吗,要是出现错误你在把错误放上来给你看
------解决方案--------------------
第二个if语句没有结束额。
这个逻辑可以用if..then.. elsif then .. else .. end if来实现,没必要所有的情况都判断两次吧。