Friday, 11 July 2014

How to Restore a table into a new table in the same database


Please use the commands to restore a table into another table in a database. Below are the commands for that .

Login to mysql database using the credentials and then run these commands in the prompt

CREATE TABLE chillar_card_recharge_new LIKE chillar_card_recharge;
INSERT chillar_card_recharge_new SELECT * FROM chillar_card_recharge;

In the first command it will create a table chillar_card_recharge_new like chillar_card_recharge.

In the second command it will copy the table data into the new table we had created.

Thanks and Regards

No comments:

Post a Comment