Viewing Table Creation Statements

Function

This statement is used to show the statements for creating a table.

Syntax

1
SHOW CREATE TABLE table_name;

Keyword

None

Precautions

The table involved in this statement must exist. Otherwise, an error will occur.

Example

Run the following statement to view the statement that is used to create table test:

1
SHOW CREATE TABLE test;