Using phpmyadmin to restore data with auto_increment
Posted: Fri Feb 23, 2007 9:33 am
I have a table which contains one field which is an auto_increment integer.
Using phpmyadmin I do a SQL query and obtain 38 records which I export to an external file.
Using some other process I delete those records.
Now I want to use phpmyadmin to reimport those records back into the table and I need those auto_increment integers to have the same values as they had before.
I'm a bit unsure of the usage for the checkbox in the export process "Add AUTO_INCREMENT value." It's checked by default, but I can't quite decipher what it does.
I would simply experiment and see what happens, but I don't actually have any data that I can afford to trash. I can, of course, set up a table and create a bunch of data and run the test. I will do that if need be, but it's quite a bit of effort, and I thought if someone here could give me the answer first.
The alternative, of course, is to save and restore the whole table, but it's pretty big - 47,000+ records.
Using phpmyadmin I do a SQL query and obtain 38 records which I export to an external file.
Using some other process I delete those records.
Now I want to use phpmyadmin to reimport those records back into the table and I need those auto_increment integers to have the same values as they had before.
I'm a bit unsure of the usage for the checkbox in the export process "Add AUTO_INCREMENT value." It's checked by default, but I can't quite decipher what it does.
I would simply experiment and see what happens, but I don't actually have any data that I can afford to trash. I can, of course, set up a table and create a bunch of data and run the test. I will do that if need be, but it's quite a bit of effort, and I thought if someone here could give me the answer first.
The alternative, of course, is to save and restore the whole table, but it's pretty big - 47,000+ records.