24 October 2013

Clone a MySQL Table

First, create the new table.
CREATE TABLE new_table LIKE original_table;
Then, copy over the data.
INSERT INTO new_table SELECT * FROM original_table;

No comments:

Post a Comment