Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Restrictions on updating views in Oracle 8

Restrictions on updating views in Oracle 8

From: Capt. D. Williams <velocette_at_msn.com>
Date: Wed, 26 Aug 1998 23:27:33 +0100
Message-ID: <uZ7peDU09GA.326@upnetnews03>


jill_at_jwebster.force9.co.uk
Using the emp & Dept tables I have created a view called v_salaries

create or replace view v_salaries as

select      e.empno

, e.ename
, e.sal
, d.deptno
, d.dname
from emp e
, dept d
where e.deptno = d.deptno

Tried two updates:
update v_salaries
set dname = 'BLOBBY' This won't work, returns error = "Cannot modify a column which maps to a non-key-preserved table"

update v_salaries

set      sal = sal * 1.1                 This works just fine!!

My info tells me that you cannot ever update a view. Is this just = applicable to Oracle 7 and has this now been changed in Oracle 8? Why = can I do the first statement and not the second? Is this because the = first statement refers to a child table and the second statement refers = to a parent table? Any help on the latest restrictions for updating = views would be gratefully received. Please respond to = jill_at_jwebster.force9.co.uk Received on Wed Aug 26 1998 - 17:27:33 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US