MySQL Forums
Forum List  »  General

UPDATE multiple tables with one UPDATE statement
Posted by: Anthony Linhardt
Date: April 26, 2006 12:38PM

I need assistance on how to UPDATE multiple tables with one statement. For example: I have 2 tables Table A, and Table B. Each table has different columns except for the primary key. How would I go about writing the statement as one statement? I looked into the documentation and read about updating multiple tables, but it seems that the example in the documentation is about updating multiple tables with the same columns. Am I wrong on this and not understanding it right?

Table A

Table B

How would you do a single UPDATE to populate both tables with the necessary data?

Options: ReplyQuote

Written By
UPDATE multiple tables with one UPDATE statement
April 26, 2006 12:38PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.