How to import a table into another table?

and also because the real table has existing rows, so renaming the test table means you’d have to drop the real table first, and lose all those rows

:slight_smile:

Ah. Oops. Missed that part. Never mind then. In my experience, merging two databases is usually best left to custom code. The SELECT-INSERT shortcut solution works in some cases though. If I wanted to renumber all rows from 1, I’d probably drop the auto_increment column and then re-add the column after merging the two tables.

Back up your table data before doing anything drastic that can’t be undone!

Oops, this ended up in a long discussion. It worked for me when I left at the top.
So the first solution was fine for me. Everything is up and running.
Just that INSERT INTO but not the auto increment field. Well, at least I think that is what I did finally.

yep it did :lol:

looking back and seeing you had 2 possible solutions to use since post #4, the rest up to yours before this one minus a handful of posts are basically dribble :rolleyes::rolleyes::rolleyes:

thank you

tell me, did your real table actually have data already in it when you wanted to insert the rows from your test table?

Or, was it that the testing table had some out of sequence rows that you wanted to reset to being sequential in the live table?

Off Topic:

Times like this you wish these forums were a little less polite and that argument could have been resolved with a simple 3 or 4 misspelled curses à la YouTube

In the absence of such oblique insults which, while they might be entertaining, don’t help anyone, I will just restate the obvious: Kalon has repeatedly shown that he doesn’t know what he’s doing and has repeatedly shown no interest in being taught the correct way to do things. For these reasons any advice he gives is, more likely than not, going to be deeply flawed. He has nothing to offer the forum until his attitude changes, and until such time I personally am keeping him on ignore and advise others to do the same.

after butting heads with him on several occasions, and enduring his annoying gotta-have-the-last-word posts (taken to ridiculous extremes in this very thread), i would agree

now watch him come back and agree to disagree :rofl:

I would suggest it might be a good time to close this and not prolong the agony :smiley: