This can help you quickly copy the table as test data during development without having to risk directly operating the running data table.
The example is as follows:
quickly copy the mytbl table in the production database to mytbl_new, the two commands are as follows:
CREATE TABLE mytbl_new LIKE production.mytbl;
INSERT mytbl_new SELECT * FROM production.mytbl;
The first command is to create a new data table mytbl_new, and Copy the data table structure of mytbl.
The second command is to copy the data in the data table mytbl to the new table mytbl_new.
Note: production.mytbl specifies the database name of the table to be copied as production. It is optional.
If there is no production., MySQL database will assume that mytbl is currently operating in the database.