If you want to duplicate a MySQL table (with data), you can do:
mysql> CREATE TABLE tmpscores LIKE scores; Query OK, 0 rows affected (0.00 sec) mysql> INSERT INTO tmpscores SELECT * from scores; Query OK, 116 rows affected (0.02 sec) Records: 116 Duplicates: 0 Warnings: 0 mysql>
Alternatively, you can do this in one step:
mysql> CREATE TABLE tmpscores SELECT * FROM scores; Query OK, 116 rows affected (0.02 sec) Records: 116 Duplicates: 0 Warnings: 0 mysql>
Note that the first method does create indexes for you while the second doesn’t (see here).