Copy existing table schema to a new table
Copy existing table schema to a new table
Answer:
To copy the table schema of an existing table to a new table, without copying its data:
mysql> CREATE TABLE new_table LIKE old_table;
Related posts:
- How to rename table in MySQL
- Create temporary table in MySQL
- Add an existing user to an existing group
- How to REORG a table in MySQL
- Repair table in MySQL
Post a Comment