使用like进行表结构复制

来源:互联网 发布:贵州广电网络上不了网 编辑:程序博客网 时间:2024/05/22 14:53

 

原表:
create table log_00
(
   aiid int not null auto_increment,
   change_time datetime not null,
   primary key (aiid)
);

复制出的新表:
create table log_01 like log_00;
create table log_02 like log_00;
create table log_03 like log_00;
create table log_04 like log_00;