Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Updating from two tables
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. Received on Wed Jul 26 2006 - 10:32:26 CDT