Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Updating from two tables
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