MySQL中create table as VS create table like
程序员文章站
2022-06-03 08:00:50
...
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语句的基本语法是
-
mysql create table过程_MySQL
-
mysql create table过程_MySQL
-
MySQL进阶_create table篇_MySQL
-
MySQL create table as与create table like对比
-
MySQL中create table语句的基本语法是
-
MySQL中表复制:create table like 与 create table as select
-
MySQL create table as与create table like对比
-
MySQL中表复制:create table like 与 create table as select
-
MySQL的create table as 与create table like区别