mysql中表copy中的几种方法
1、方式1:CREATE TABLE new_staff LIKE staff;

2、copy表,包括表结构和索引但不会copy源表的数据

3、方式2:create table new2_staff as (select * from staff);

4、copy表结构,包括数据,但索引,主键不会copy

5、有没有发现,create table 新表名 as 后面是 一个selelct 语句因此新表中可以只包括新表中部分字段命令:create table new2_staff as (select id,current_ from staff);

6、新表中只包括源表中的部分数据命令:罕铞泱殳create table new5_staff as (select * from staff where right(id,1)<5);只复制5条数据
