SHOW CREATE TABLE
Function
Displays the created tbl_name table.
Displays the named table created by CREATE TABLE. This syntax can also be used to query the statement for creating a view.
Precautions
N/A
Syntax
show create table tbl_name;
Parameter Description
- tbl_name -  Table name. 
Examples
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)
Feedback