News:

Wondering if this will always be free?  See why free is better.

Main Menu

Help with UPDATE TABLE

Started by skb, February 05, 2020, 11:50:10 PM

Previous topic - Next topic

skb

I need to update a table into my new database from an older database. Inserting the old records should be fine, if the newer records also remain intact.
I've tried various permutations and combination with the UPDATE TABLE command but keep running into syntax errors, as I am a total nerd.

Can someone please guide me.

SMF 2.1.4 / TP 2.2.2

d3vcho

Tell us how are you trying to do it, so we can tell you what's wrong.
"Greeting Death as an old friend, they departed this life as equals"

skb

Through PhPMyadmin on my Wamp local setup.

I finally got it with this command;

QuoteINSERT INTO dbxxx.smf_tablename SELECT * FROM dbyyy.smf_tablename;

But not before working around a Duplicate Entry for Primary Key error with this;

QuoteSET foreign_key_checks = 0;
TRUNCATE `tablename`;
SET foreign_key_checks = 1;

SMF 2.1.4 / TP 2.2.2

Advertisement: