Reputation: 11879
I accidentally deleted some rows in my database, but I have a copy of the data in a backup.
Is it possible to insert the rows back in with the same id (auto-increment field). Or do I have to use the auto-increment generated id then update all the relationships manually?
Upvotes: 10
Views: 11353
Reputation: 14179
You can, just by setting the field when INSERTing. Autoincrement only works if no value is specified for the field.
Upvotes: 22