Jump to content

Update And Insert Question

Recommended Posts

Hello,I'm a new one to use MySQL. I have a table say tab1. It includes some records, and the primary Key is ID. Now I have another table say tab2. The two tables' structures are identical. The tab2 has some records which existed in tab1 and some new records.I need to update tab1 records if the one existing from tab2 and insert the new records from tab2.How to write a single SQL to perform the task?Thank you,

Link to post
Share on other sites
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...