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 -> Update one table by another

Update one table by another

From: Surfer Netzbetrieb <ep_nm_ka_at_yahoo.de>
Date: 24 Mar 1999 18:22:01 GMT
Message-ID: <36F93071.4E9E8437@yahoo.de>


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_field
UPDATE ! 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 where
aliasTabA.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

Original text of this message

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