直接学习:https://edu.csdn.net/course/play/27328/370715
复制表的几种方式
#1、复制表的几种方式,如图所示:
#2、示例代码如下:
create table t1(
id int not null auto_increment primary key,
name varchar(50) comment'姓名'
);
insert into t1(name) values ('张三');
insert into t1(name) values ('李四');
create index idx_name on t1(name);
create table t2 like t1;
show create table t2;
show index from t2;
create table t3 select * from t1;
show create table t3;
show index from t3;
create table t4 like t1;
insert into t4 select * from t1;
show create table t4;
show index from t4;