Skip to content

SHOW CREATE TABLE statement #3441

@TarantoolBot

Description

@TarantoolBot

Statement can be used to obtain a description of a space in the form of
a corresponding CREATE TABLE and CREATE INDEX statements. Result
will be in form of set of statements and set of found errors. If errors
were not detected, set of the statements should be enough to completely
serialize space definition.

There is two types of SHOW CREATE TABLE statement:

  1. Get a description of a single space:
SHOW CREATE TABLE table_name;

This statement can be used to obtain a description of a space in the
form of the corresponding CREATE TABLE and CREATE INDEX statements.
The result will be in the form of a set of statements and a set of found
errors. If no errors are found, the set of statements should be
sufficient to fully serialize the space definition. Otherwise, it will
certainly not be a complete space definition, and a CREATE TABLE
statement is generally not guaranteed to be syntactically correct.

  1. Get descriptions of all available non-system spaces:
SHOW CREATE TABLE;

This statement returns descriptions for each available non-system space
in the form described above.
Requested by @ImeevMA in tarantool/tarantool@5ab5ce2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    sql[location] SQL manual

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions