1.
SQL> select * from tt1;
A N
-------- ----------
a 1
b 2
SQL> select * from tt2;
A C
-------- --------
a c
d c
SQL> create view v_tt as
2 select tt1.a,tt1.n,tt2.c
3 from tt1,tt2
4 where tt1.a=tt2.a;
View created
2.SQL> insert into v_tt values('f',9,'d');
insert into v_tt values('f',9,'d')
ORA-01776: cannot modify more than one base table through a join view
3.create a trigger
create or replace trigger t_v_tt
instead of delete or update or insert on v_tt
for each row
begin
if inserting then
insert into tt1 values(
:new.a,
:new.n);
insert into tt2 values(
:new.a,
:new.c);
end if;
end;
4.SQL> insert into v_tt values('e',8,'a');
1 row inserted
SQL> commit;
Commit complete
5.
SQL> select * from tt1;
A N
-------- ----------
b 2
a 88
e 8
SQL> select * from tt2;
A C
-------- --------
a cc
d c
e a
6.关于instead of 触发器可参考concept和application guide;