I have a mysql table to which i have imported a csv file and if i try to import another csv file to the same mysql table will it replace the previous data or gets appended????
-
It gets appended. it will not harm your existing records unless you have some sort of key defined in the table (like unique key... In that case you need to mention 'REPLACE' in your import query)Priyanshu– Priyanshu2016-05-24 06:02:16 +00:00Commented May 24, 2016 at 6:02
-
I'd say that depends on how you import that CSV data. Why don't you simply try it with a test table?arkascha– arkascha2016-05-24 06:02:50 +00:00Commented May 24, 2016 at 6:02
-
import is like insert its not affect your previous data .it just appendingJYoThI– JYoThI2016-05-24 06:06:41 +00:00Commented May 24, 2016 at 6:06
-
I have made id of the table as a primary key and it is auto incremented and when i import csv file the id will be auto incremented right???Sanjay Hp– Sanjay Hp2016-05-24 06:07:30 +00:00Commented May 24, 2016 at 6:07
-
yes , You are right. in your case data will be appended. It wont do any harm to existing data, plus your id will be auto_incremented, no need to mention it in the queryPriyanshu– Priyanshu2016-05-24 06:17:23 +00:00Commented May 24, 2016 at 6:17
Add a comment
|