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: Updating from two tables

Re: Updating from two tables

From: <RiseY3K_at_gmail.com>
Date: 26 Jul 2006 09:52:36 -0700
Message-ID: <1153932755.418220.57000@m73g2000cwd.googlegroups.com>


Jerome Vitalis wrote:
> Try something like this:
>
> update (select a.pri_order a_pri_order,
> b.pri_order b_pri_order,
> a.sec_order a_sec_order,
> b.sec_order b_sec_order
> from table_a a,table_b b
> where a.id=b.id)
> set b_pri_order=a_pri_order,
> b_sec_order=a_sec_order;
>
> You'll need a primary key on a.id.

Thank you, works with prirmary key on id Received on Wed Jul 26 2006 - 11:52:36 CDT

Original text of this message

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