create table a
(
a number(2),
id number(2)
)
create table b
(
b number(2),
id number(2)
)
insert into a (a,id)values(1,9)
insert into b (b,id)values(2,9)
create trigger a_update
before update of a on a
referencing old as old_value
new as new_value
for each row
begin
:new_value.id:=5;
end
drop trigger a_update;
update a set a=5
select *
from a
select*
from b
我想把a表中的a字段改为5,同时b表中的b字段也变成5
------解决方案--------------------