The Pursuit of Happyness

Create a copy of the table 

CREATE TABLE products_bak LIKE products

Copying the data from the original table to the new table

INSERT INTO products_bak SELECT * FROM products

Copying the data back again

TRUNCATE products;
INSERT INTO products SELECT * FROM products_bak

original link http://www.electrictoolbox.com/copy-table-mysql-create-table-like/


Comment +0