复制表结构

1. 仅复制表结构: create table new_table like old_table  或 create table new_table  select * from old_table where 1 =2

2. 复制表结构 及内容: create table new_table select select * from old_table

3. 仅复制表数据 insert into new_table select * from old_table(两表结构一样)

4. 复制部分字段内容:INSERT INTO 新表(字段1,字段2,.......) SELECT 字段1,字段2,...... FROM 旧表

原文地址:https://www.cnblogs.com/hellomandy/p/8068235.html