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: update row in a view

Re: update row in a view

From: Igor V. Podolsky <igoryok_at_soft-review.kiev.ua>
Date: Tue, 25 Jan 2000 10:38:42 +0200
Message-ID: <AAS3MZuS80Y@soft-review.kiev.ua>


SKurosky <skurosky_at_aol.com> wrote in message news:20000121132104.03707.00001088_at_ng-fs1.aol.com...

> >My understanding is that you dont update the view. You update the tables
> >upon which the view is based. Since the views are dynamic, they
> >automatically reflect the updated data.

Sure, but You can update underlaying tables using 'update <view_name>' statement. But there are some restrictions: documentation says something about 'key-preserved tables. It's quite complex thing, but in the following example You'd just check existance of primary (may be unique key is enough) key on t1.c2 and foreign key on t2.c2. The background of restrictions is simple - Oracle have to know what rows and columns of underlaying table should be updated.

> >SKurosky wrote in message

<20000120141305.09281.00000068_at_ng-cm1.aol.com>...
> >>>Hallo!
> >>>
> >>>I have a view like
> >>>select t1.c1 t2.c1 from t1,t2 where t1.c2 = t2.c2.
> >>>I canœt update rows in this view.
> >>>What did i wrong?

> >I didn't ask the question. I replied to the question regarding updating a
> view.

:)

--
Is There A God Or Any Kind Of Justice Under The Sky... (Queen'91)

Igor V. Podolsky (igoryok_at_soft-review.kiev.ua) Received on Tue Jan 25 2000 - 02:38:42 CST

Original text of this message

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