求教一个触发器,在TEST表中,有A、B、C三列(都是数值型的),其中修改A列,则C列直接就等于A列*B列

[复制链接]
查看11 | 回复2 | 2012-7-18 21:45:53 | 显示全部楼层 |阅读模式
我也是oracle新手,查资料,研究了半天,开始我的回答是错了,下面这样测试通过了create or replace trigger t_jh_cbbefore update of a on jhmxbfor each rowbegin if
updating then :new.c:=:old.a*:old.b;end if;end t_jh_cb;...
回复

使用道具 举报

千问 | 2012-7-18 21:45:53 | 显示全部楼层
create trigger myTrriger on test after updateasbeginif update(a)update test set c=a*b where 主键 in (inserted.主键)end...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行