Skip to content
Snippets Groups Projects
Commit 5ab5ce2a authored by Mergen Imeev's avatar Mergen Imeev Committed by Vladimir Davydov
Browse files

sql: introduce SHOW CREATE TABLE statement

This patch introduces the SHOW CREATE TABLE statement. This statement
can be used to obtain a description of a space in the form of a
corresponding CREATE TABLE and CREATE INDEX statements.

Closes #8098

@TarantoolBot document
Title: SHOW CREATE TABLE statement

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.

2) 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.
parent 0700f514
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment