create table as:
说明:复制表结构和数据
用法:
create table new_table as select * from old_table;
create table new_table as select * from old_table limit 0;
# limit 0表示只复制表结构,不复制数据。
create table like:
说明:复制表结构和索引结构
用法:create table new_table like old_table
举例:create table t_log_2018_01_02 like t_log_2018_01_01;
MySQL中create table as VS create table like
最新推荐文章于 2025-02-10 16:44:56 发布