Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Difficult Correlated Update Query
How do I update a column in one table with the column value in another table and have it correlated to the same key. For example:
Table A
Akey Col1
1 a 2 b 3 c
Table B
Bkey Col2
1 x 2 y 3 z
I tried:
update A
set Col1 = (select Col2 from B where Akey = Bkey)
and
update A
set Col1 = (select Col2 from B where Akey = Bkey) where Akey = Bkey
and
update A
set Col1 = (select Col2 from B)
where Akey = Bkey
I still haven't figured it out. Does anyone know?
Thanks. Received on Wed Nov 29 2000 - 19:55:11 CST
![]() |
![]() |