SHOW CREATE TABLE
Description
This statement shows the CREATE TABLE statement that creates the named table.
Syntax
1. > SHOW CREATE TABLE tbl_name
Examples
1. drop table if exists t1;
2. create table t1(
3. col1 int comment 'First column',
4. col2 float comment '"%$^&*()_+@!',
5. col3 varchar comment 'ZD5lTndyuEzw49gxR',
6. col4 bool comment ''
7. );
8. mysql> show create table t1;
9. +-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
10. | Table | Create Table |
11. +-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
12. | t1 | CREATE TABLE `t1` (
13. `col1` INT DEFAULT NULL COMMENT 'First column',
14. `col2` FLOAT DEFAULT NULL COMMENT '"%$^&*()_+@!',
15. `col3` VARCHAR(65535) DEFAULT NULL COMMENT 'ZD5lTndyuEzw49gxR',
16. `col4` BOOL DEFAULT NULL
17. ) |
18. +-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
19. 1 row in set (0.00 sec)
