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: question on delete statement

Re: question on delete statement

From: Anurag Varma <avarmadba.skipthis_at_yahoo.com>
Date: Fri, 20 Jun 2003 21:02:53 GMT
Message-ID: <1EKIa.2901$hI1.1344@nwrddc01.gnilink.net>

"Daniel Morgan" <damorgan_at_exxesolutions.com> wrote in message news:3EF36687.48564458_at_exxesolutions.com... --snip--
>
> Look at the standard syntax for updating tables with nested tables and
objects.
> Update and Delete against a SELECT is the norm.
>
> --
> Daniel Morgan
> http://www.outreach.washington.edu/extinfo/certprog/oad/oad_crs.asp
> damorgan_at_x.washington.edu
> (replace 'x' with a 'u' to reply)

Daniel,

I know deletes based on nested selects are a norm. This thread is referring to the join based delete/update syntax.

Tell me .. is this a valid syntax according to you:

update (select lprice, price

            from localtab, maintab
            where maintab.item = localtab.item)
set lprice = price
/

maintab = (item, price) with PK on item
and
localtab = (item, lprice)

Now I know this can be written as (and this is the norm): update localtab set lprice = (select price from maintab

                                           where maintab.item =
localtab.item)
/

Anurag Received on Fri Jun 20 2003 - 16:02:53 CDT

Original text of this message

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