Foreword:
The sub-table storage is used in the project, and 100 tables need to be created. Each table has the same structure. The original operation is to copy and paste one by one and modify the name. DBA gave advice today
create table a like b
Copy the table structure and indexes of b
create table a as select * from b limit 0
Only the table structure is copied, not the table index
See blog: https://blog.csdn.net/risingsun001/article/details/23449241