Nov 10, 2018

How to copy the content of one table to another table in MySQL

#create the new table with the same schema:
DROP TABLE IF EXISTS TABLE2;
CREATE TABLE TABLE2 LIKE TABLE1;
#then, copy the data:
INSERT INTO TABLE2 SELECT * FROM TABLE1;