如何将MySQL表的数据,结构和索引复制或克隆或复制到新表?
这是我到目前为止所发现的.
这将复制数据和结构,但不复制索引:
create table {new_table} select * from {old_table};
Run Code Online (Sandbox Code Playgroud)
这将复制结构和索引,但不复制数据:
create table {new_table} like {old_table};
Run Code Online (Sandbox Code Playgroud)