oracle update触发器 更新某一字段时往另一张表insert相关数据的触发器

我要在在A表上增加一个触发器,针对regno字段做update操作 当传入的mduser字段为API,status为P时,向B表中insert 一条记录,sync字段为0,修改次数为之前的次数加1,
该怎么写?求各位大神帮忙看下。。。。在线等
www.cnblogs.com/yangchengdebokeyuan/p/9240740.html

create or replace trigger test1
after update of id on test1
for each row
begin
insert into test2(name) values('now,you update test1.id ,and i can feel you !');
end;
纯手打,根据字段触发就是这样,您可以参考着写。追问

那我如果现在是insert的时候有个时段的值为MA的时候也要触发这个该怎样写?(现在的触发条件是update的时候有三个字段为触发条件,insert的时候一个字段为触发条件)
我如果往表里insert数据,那些参数值是用SQL查出来放进去?

温馨提示:答案为网友推荐,仅供参考
相似回答