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: Update on join, how?

Re: Update on join, how?

From: Brian M. Biggs <bbiggs_at_cincom.com>
Date: 1996/11/14
Message-ID: <328BBE2E.396F@cincom.com>#1/1

Thomas J. Kyte wrote:
>
> because we support the ANSI way of doing it (the from clause in an update/delete
> is specific to sql server)
>
> update table_a
> set cola = 'x'
> where exists ( select null
> from table_b b
> where b.col = table_a.col )
> /

Is the EXISTS operator an ANSI standard?

> update table_a
> set cola = 'x'
> where col in ( select col
> from table_b )
> /

In an old Oracle SQL tuning guide (before Oracle V6, I think), I remember reading that the EXISTS operator is MUCH faster than the IN operator in situations like this. Is that true? Does that apply only to the rule based optimizer, or is that valid for cost-based as well?

Also, see my post earlier today in c.d.o.m about correlated updates.

Thanks,
Brian

-- 
Brian M. Biggs				mailto:bbiggs_at_cincom.com
Cincom Systems, Inc.			voice: (513) 677-7661
http://www.cincom.com/
Received on Thu Nov 14 1996 - 00:00:00 CST

Original text of this message

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