MySQL - Duplicate table

前端 未结 2 719
失恋的感觉
失恋的感觉 2020-12-28 12:39

I need to duplicate a table in MySQL, making the new table empty. That is, I need to copy only the structure of an existing table to a new one.

2条回答
  •  再見小時候
    2020-12-28 13:29

    There is also another way to create a empty table as existing table and you can use the following command also

    create table a select * from users2 limit 0, 0;
    

提交回复
热议问题