1. 创建一张原始表
create table tb_user(
id int(10) primary key auto_increment,
name varchar(255)
);
2. 复制原始表中的结构为新表
create tb_user_copy like tb_user;
3. 复制原始表中数据
insert into tb_user_copy select * from tb_user;
1. 创建一张原始表
create table tb_user(
id int(10) primary key auto_increment,
name varchar(255)
);
2. 复制原始表中的结构为新表
create tb_user_copy like tb_user;
3. 复制原始表中数据
insert into tb_user_copy select * from tb_user;