功能说明
源表包含自增列,create table like 的目标表继承自增列属性。
示例
GBase 8a MPP Cluster 产品手册
5 数据库管理指南
文档版本953(2022-09-15)
南大通用数据技术股份有限公司
1011
gbase> CREATE TABLE t1_1 like t1;
Query OK, 0 rows affected (Elapsed: 00:00:00.07)
gbase> SHOW CREATE TABLE t1_1 \G
*************************** 1. row ***************************
Table: t1_1
Create Table: CREATE TABLE "t1_1" (
"name" varchar(10) DEFAULT NULL,
"id" int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY ("id")
)
ENGINE=EXPRESS
DEFAULT
CHARSET=utf8
TABLESPACE='sys_tablespace'
1 row in set (Elapsed: 00:00:00.00)