Materialize Logo

SHOW CREATE TABLE

SHOW CREATE TABLE returns the SQL used to create the table.

EXPERIMENTAL! This feature is under construction and requires experimental mode. Available since v0.4.1.

Syntax

SHOW CREATE TABLE table_name
Field Use
table_name The table you want use. You can find available table names through SHOW TABLES.

Examples

CREATE TABLE t (a int, b text NOT NULL);
SHOW CREATE TABLE t;
        Table         |                             Create Table
----------------------+----------------------------------------------------------------------
 materialize.public.t | CREATE TABLE "materialize"."public"."t" ("a" int, "b" text NOT NULL)