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 19:33:29 GMT
Message-ID: <dkJIa.159$lU1.115@nwrddc04.gnilink.net>


I agree
... Jusung's reply summarizes this quite nicely.

Anurag

"FC" <flavio_at_tin.it> wrote in message
news:FlIIa.217676$g92.4523896_at_news2.tin.it...
>
> "Anurag Varma" <avarmadba.skipthis_at_yahoo.com> wrote in message
> news:2pGIa.1281$hI1.1274_at_nwrddc01.gnilink.net...
>
>
>
> >
> > It seems to delete the rows of the table mentioned first in the from
> clause
> > of the select statement.
> > The tables should be joined on their PK's!
> >
>
> It is not necessary that both tables are joined on their PKs. If only one
> column is primary key, the records will be deleted from the table where
the
> joined column is not primary key, no matter what is the order of the
tables
> in the FROM clause.
> I suppose this is what Oracle means by "key preserve" rule.
>
> On the other hand, if both columns are pk, it's true what you said, the
> order matters.
>
> I'd dare to summarise the rule as follows: in a "one-to-many"
relationship,
> it's always the many that gets deleted (or updated).
>
> Bye,
> Flavio
>
>
>
Received on Fri Jun 20 2003 - 14:33:29 CDT

Original text of this message

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