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

Home -> Community -> Usenet -> c.d.o.server -> Re: updateable views !?!?

Re: updateable views !?!?

From: Mark Malakanov <markmal_at_sprint.ca>
Date: Tue, 12 Oct 1999 00:14:34 -0300
Message-ID: <cyyM3.4665$j35.167251@newscontent-01.sprint.ca>


Hi Russel.

Note, this possibility was partly realized in O7 (I'm not sure about O6/5) You can make change in complex views if your changes relates to columns of table which "preserves keys" in this view.

So. If you make

create or replace view scott.depemp as select dept.dname, emp.ename
from scott.emp, scott.dept where emp.deptno=dept.deptno

In this view table emp saves key, because this have rows exactly equal table emp.
Table dept has duplicates in this view and doesnt preserve key.

You can
update scott.depemp set ename='Ward' where ename='WARD'

but you can not
update scott.depemp set dname='Sales' where ename='WARD'

The simple views like 'select * from T' you can change unlimited.

To disable DML against views use "WITH READ ONLY" magic words.

Mark Malakanov,
OraDBA
Sapience, Toronto

Russell Davis <deep_structures_playground_at_worldnet.att.net> wrote in message news:7tt5mn$7sn$1_at_bgtnsc02.worldnet.att.net...
> Can anyone tell me why updateable views are a desirable feature in
Oracle8?
> Seems idiosyncratic and fraught with unnecessary complexity. Am I being
too
> conservative in embracing this feature?
>
>
Received on Mon Oct 11 1999 - 22:14:34 CDT

Original text of this message

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