Re: Oracle SQL: UPDATE using Subquery or Join

From: Marc A. Lefebvre US-775 <lefebvre_at_iwavesolutions.com>
Date: 29 May 2003 12:51:00 -0700
Message-ID: <5ef1a86c.0305291151.7b719d42_at_posting.google.com>


hyun3688_at_hotmail.com (hyun) wrote in message news:<cbf43764.0305281630.163a8948_at_posting.google.com>...
> i think ^^*
>
>
> update A
> set A.name = (select B.name
> from A, B
> where A.id = B.id)
> where A.id = (select B.id
> from A, B
> where A.id = B.id)

How would we change this example to do an INSERT?

For example, how would you INSERT A into B?

And Finally, how do we combine these two solutions into the MERGE command, using the INSERT and UPDATE as the clauses of the MERGE??

Marc Received on Thu May 29 2003 - 21:51:00 CEST

Original text of this message