how to copy table structure in mysql code example
Example 1: mysql copy table to another table
CREATE TABLE new_table
SELECT col1, col2, col3
FROM
existing_table
WHERE
conditions;
Example 2: clone table structure mysql
CREATE TABLE foo SELECT * FROM bar LIMIT 0
Or
CREATE TABLE foo SELECT * FROM bar WHERE 1=0