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 -> Re: Deleting from Vievs

Re: Deleting from Vievs

From: mig <oxe_at_xinfo.dk>
Date: Tue, 4 Jan 2000 02:02:05 +0100
Message-ID: <vGbc4.649$jg4.1981@news.get2net.dk>


Well I thought that in oracle 7.3 there is an function (updateable) which gives you if any column is updatable in a view (based upon the view - logic structure , it does not take rights into consideration to my opinion) akarb_at_xinfo.dk

Jonathan Lewis wrote in message
<946507555.7928.0.nnrp-14.9e984b29_at_news.demon.co.uk>...
>
>In 7.3+ you can delete from a join view provided
>it contains exactly one key-preserved table,
>although the definition of 'key-preserved' isn't
>immediately obvious, especially if you read the
>manuals. - e.g.
>
>
>create table t_1 (n1 number primary key, v1 varchar2(20));
>create table t_2 (n1 number, n2 number , v1 varchar2(20));
>
>create view v_1 as
>select t1.n1 t1_n1, t2.n2 t2_n2, t1.v1 t1_v1, t2.v1 t2_v1
>from t_1 t1,t_2 t2
>where t1.n1 = t2.n1
>;
>
>View created.
>
>desc v_1
> Name Null? Type
> ------------------------------- -------- ----
> T1_N1 NUMBER
> T2_N2 NUMBER
> T1_V1 VARCHAR2(20)
> T2_V1 VARCHAR2(20)
>
>
>insert into t_1 values (1,'a');
>insert into t_2 values (1,1,'x');
>insert into t_2 values (1,2,'y');
>commit;
>
>select * from v_1;
>
> T1_N1 T2_N2 T1_V1 T2_V1
>--------- --------- -------------------- --------------------
> 1 1 a x
> 1 2 a y
>
>delete from v_1 where t2_n2 = 2;
>
>1 row deleted.
>
>select * from v_1;
>
> T1_N1 T2_N2 T1_V1 T2_V1
>--------- --------- -------------------- --------------------
> 1 1 a x
>
>
>--
>
>Jonathan Lewis
>Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk
>
>david_g wrote in message <05108cf7.9323360b_at_usw-ex0107-049.remarq.com>...
>>Assuming the permissions allow, you can only delete from a view that is
>>based upon one table.
>>
>>
>>* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network
>*
>>The fastest and easiest way to search and participate in Usenet - Free!
>>
>
>
Received on Mon Jan 03 2000 - 19:02:05 CST

Original text of this message

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