mysql表结构复制

复制结构:仿照student表结构复制一张new_student表,新表是空的:

1
create table new_student like student;

复制数据:但是没主键,结构不重要:

1
2
3
4
create table new_student2 as
(    
	select * from student
);

复制表结构与数据,一模一样:

1
insert into new_student3 select * from student;
0%