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: little sql help

Re: little sql help

From: Mitsunori Ishikawa <ishikawa_at_metrosystems.co.jp>
Date: Tue, 26 Dec 2000 09:23:15 +0900
Message-ID: <3A47E4F3.807A9A66@metrosystems.co.jp>

How about the following statment?

update b
set b.last_name = ( select a.last_name from a where a.id = b.id ), b.fist_name = (select a.fist_name from a where a.id = b.id ) where b.id in ( 1,2,3, ....);

Regards,

Mitsunori Ishikawa

Ed Zappulla wrote:
>
> Hi, I need a little help with an update statement. I have 2 tables linked
> by id and want to update table A with some data in table A. I want to set
> table B's last and first name from table A's. Ideas?
>
> A:
> id
> last_name
> fist_name
>
> B:
> id
> last_name
> fist_name
Received on Mon Dec 25 2000 - 18:23:15 CST

Original text of this message

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