Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4024020
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:40:12+00:00 2026-05-20T10:40:12+00:00

I need to merge parallel tables from 2 different schemas. They are practically the

  • 0

I need to merge parallel tables from 2 different schemas.
They are practically the same (some fields are different), but the IDs (their PKs) are different.

I need to conform one table to contain the same IDs for the parallel rows.
(both tables continue to live after the merge, and one is synched to the other according to the IDs)

What is the best way to go about it?

  • Renaming the IDs of the first table according to the second one, and then changing the auto_increment value of the PK?

  • Creating a temporary table with the needed values inserted with the correct IDs, and then removing the original and renaming the temp?

  • Is there a better way?

Besides,
how can this affect indexes?

does it have any other reprocussions? (besides foreign_keys and places in the code – if exist – using hardcoded ID values)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T10:40:13+00:00Added an answer on May 20, 2026 at 10:40 am
    1. Don’t think you have an option. You have to generate new ids. When you insert records the auto_increment would anyway happen.
    2. You can have an additional column reference which can have the original table key value to back trace.
    3. PK indexes will be re-indexed.

    Other repercussions depend on the app functionality which you have to consider.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to merge data from 2 tables into a third (all having the
I need to merge a whole bunch of docx files programatically. Imagine they are
i have a input tag which is non editable, but some times i need
Hey, guys. I need to merge two RenderTargetBitmaps of the same size into one.
I need to merge two variables. They both are unsigned ints. First: 11000000 Second:
I have some C#/Linq code used to merge data from excel file into db,
I need to merge two XML documents, overwriting the overlapsed attributes and elements. For
I have huge number of Word files I need to merge (join) into one
I need to do a simple mail merge in OpenOffice using C++, VBScript, VB.Net
I need to be able to merge two (very simple) JavaScript objects at runtime.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.