Sometimes we need to disable the primary key AUTO_INCREMENT constraint when we want to import the data from the old table to the new table. You can do that easily if the column of the new table does not contain any foreign relation with other tables by the following code.


But if you have any foreign key relationships you need to disable that first like below:




Leave a Reply

Your email address will not be published. Required fields are marked *