mysql creating a copy of a table code example
Example 1: mysql copy table with new name
CREATE TABLE IF NOT EXISTS new_table LIKE existing_table;
INSERT new_table
SELECT * FROM existing_table;
Example 2: mysql copy table to another table
CREATE TABLE new_table
SELECT col1, col2, col3
FROM
existing_table
WHERE
conditions;