SHOW CREATE TABLE

功能描述

显示创建表 tbl_name

显示CREATE TABLE创建命名表的语句。 此语法也可用于查询视图(view)的创建语句。

注意事项

此语法不支持查询临时表。

语法格式

show create table tbl_name;

参数说明

  • tbl_name

    ​ 表名。

示例

openGauss=# CREATE TABLE t1 (c1 INT PRIMARY KEY);
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "t1_pkey" for table "t1"
CREATE TABLE
openGauss=# show create table t1;
 Table |                      Create Table                       
-------+---------------------------------------------------------
 t1    | SET search_path = public;                              +
       | CREATE TABLE t1 (                                      +
       |     c1 integer NOT NULL                                +
       | )                                                      +
       | WITH (orientation=row, compression=no);                +
       | ALTER TABLE t1 ADD CONSTRAINT t1_pkey PRIMARY KEY (c1);
(1 row)
意见反馈
编组 3备份
    openGauss 2024-04-26 00:46:53
    取消