SYSCS_UTIL.SHOW_CREATE_TABLE

The SYSCS_UTIL.SHOW_CREATE_TABLE system procedure returns the DDL to create a table, in string form.

Syntax

SYSCS_UTIL.SHOW_CREATE_TABLE( VARCHAR schemaName,
                              VARCHAR tableName );

schemaName

The name of the table’s schema.

tableName

The name of the table.

Results

This procedure returns a string representation of the CREATE TABLE statement DDL to create the specified table.

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

CALL SYSCS_UTIL.SHOW_CREATE_TABLE( 'SPLICE', '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