What's the difference between the export SQL dump type used in PhpMyAdmin?
#1
Posted 16 May 2007 - 09:19 AM
For sure, I know the most common when we use INSERT Export type to an existing database, it will insert it all w/o errors that is if the tables being inserted to the new database does not have any identical table_names.
How about for the UPDATE and REPLACE? How will it react when we insert them to the new database if there are identical table_names? ???
#2
Posted 16 May 2007 - 07:50 PM
http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html
#3
Posted 18 May 2007 - 05:45 AM
INSERT inserts new records
UPDATE updates existing records
REPLACE inserts if record is not there and updates if it is (based on primary key match)
|baaChart| easy line, column and pie charts
|baaSelect| generate js and php code for dynamic linked dropdowns
#4
Posted 12 February 2013 - 11:30 AM
#5
Posted 12 February 2013 - 02:25 PM
#7
Posted 03 March 2013 - 07:56 PM
fenway, Can you suggest a good tool for me. It might save me a lot of time.
#8
Posted 03 March 2013 - 08:06 PM
Basically
INSERT inserts new records
UPDATE updates existing records
REPLACE inserts if record is not there and updates if it is (based on primary key match)
Just to clarify, REPLACE does not update the old record. REPLACE will delete the old record and insert a new one. Be careful using REPLACE INTO if you have other tables that are referencing it.
Support my Kickstarter Project!
http://www.kickstart...7618755/antroid
Vulnerabilities: http://cwe.mitre.org...x.html#Guidance - MySQL.com hacked with SQL Injection - If it happened to them, it can happen to you.
#9
Posted 03 March 2013 - 08:11 PM
Am I correct that there is no option that will delete a record if it no longer exists in the copy that is being imported?
If you just want the imported records and only those imported records, PHPMyAdmin has the option of adding the "DROP TABLE" statement. This is essentially like restoring a backup. I would be very careful doing this on a production site though.
Support my Kickstarter Project!
http://www.kickstart...7618755/antroid
Vulnerabilities: http://cwe.mitre.org...x.html#Guidance - MySQL.com hacked with SQL Injection - If it happened to them, it can happen to you.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users












