Show Create Table

The show create table command displays the DDL used with the create table statement to create a specified table.

Syntax

SHOW CREATE TABLE schemaName.tableName

schemaName

The schema name. If not specified, the current schema is used.

tableName

The table name.

Example

splice> CREATE TABLE Players(
    ID           SMALLINT NOT NULL,
    Team         VARCHAR(64) NOT NULL,
    Name         VARCHAR(64) NOT NULL,
    Position     CHAR(2),
    DisplayName  VARCHAR(24),
    BirthDate    DATE
    );
0 rows inserted/updated/deleted

show create table players;
DDL
---
CREATE TABLE "SPLICE"."PLAYERS" (
"ID" SMALLINT NOT NULL
,"TEAM" VARCHAR(64) NOT NULL
,"NAME" VARCHAR(64) NOT NULL
,"POSITION" CHAR(2)
,"DISPLAYNAME" VARCHAR(24)
,"BIRTHDATE" DATE
) ;

1 row selected

See Also