Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Update one table by another
Hello,
how can I update a colum in one table by another table's column in SQL (same key)?
primary-key: my_ID
TableA TableB ===== ====== my_ID my_ID old_field <<= new_fieldUPDATE ! My first tries are very complex:
update TableA set old_field = (Select new_field from TableB where my_ID in (Select my_ID from TableA aliasTabA wherealiasTabA.my_ID = TableA.my_ID))
Can somebody correct/ adjust/ improve my update ?
Thank you
Ekkard Gerlach
Received on Wed Mar 24 1999 - 12:22:01 CST
![]() |
![]() |