Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Update view problem
I think that, in order to use UPDATEABLE views, primary keys from both
tables must be present in the view
and in this example, I think that both "X"s (a.x, b.x) must be present in
order to do
create view v1 as
select a.key a_key,
b.key b_key, a.x a_x, b.x b_x from t1... a
update v1
set a_x = new, b_x = new;
Mr. Chow Wing Siu <wschow_at_Comp.HKBU.Edu.HK> wrote in message
news:81166n$rq2$1_at_power25t.hkbu.edu.hk...
> Thank you for any help.
>
> create view v1 as select a.* from t1_at_db1 a union b.* from t1_at_db2 b;
> update v1 set x='new' where x='old';
>
> But this update is illegal, I think it is because the x(old)
> cannot be located either from t1_at_db1 or t1_at_db2.
>
> Then, how to make it become LEGAL? I used to replicate the same
> value to two identical tables (tablename, columnname) to two
> different databases (sites).
>
> --
> Johnson Chow
Received on Thu Nov 18 1999 - 18:20:44 CST
![]() |
![]() |