Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Restrictions on updating views in Oracle 8
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
![]() |
![]() |