Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Modifiable join view
"Steve Salvemini" <steve.salvemini_at_adelaide.edu.au> сообщил/сообщила в
новостях следующее: news:3BD7D0A7.9E1F1EC6_at_adelaide.edu.au...
> Hi all, just a little problem I'm having but can't see an easy solution.
> Goes something like this, hopefully this is not too abstract:
>
> table test1 ->
> cola
> colb
> colc_1
>
> unique index on cola and colb
>
>
> table test2 ->
> cola
> colb
> colc_2
> cold_2
>
> unique index on cola, colb, colc_2
>
>
> create view view1 (cola, colb, cold_2)
> as select a.cola, a.colb, b.cold_2
> from test1 a, test2 b
> where a.cola = b.cola
> and a.colb = b.colb
> and colc_2 = 0
>
>
> my update then is
>
> update view1 set colc_1 = 'X'
> where colb = 'ACB'
> and colb = 'DEF'
>
> the error then is:
> ORA-01779: cannot modify a column which maps to a non key-preserved
> table
You don't have colc_1 into View1 :-) so you can't update this column.
Sergey M. Received on Fri Oct 26 2001 - 04:47:38 CDT
![]() |
![]() |