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.
Tell us how are you trying to do it, so we can tell you what's wrong.
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;