SHOW CREATE TABLE tbl_name
The SHOW CREATE TABLE statement shows the CREATE TABLE statement used to create the specified table. To use this statement, you must have the necessary privileges for the table. The statement also works for views.
SHOW CREATE TABLE lists all CHECK constraints as table constraints. A CHECK constraint that was originally part of a column definition appears as a separate clause, outside the column definition.
By default, SHOW CREATE TABLE includes the definition of the table’s generated invisible primary key (GIPK), if one exists. You can hide this information by setting the show_gipk_in_create_table_and_information_schema system variable to OFF.
For more information, see the MySQL documentation: SHOW CREATE TABLE Statement.