The SHOW CREATE TABLE can be used to view the exact statement that was used to create an existing table. This can be helpful in understanding the structure of a table. It can also be used as a basis for the syntax to create a new table. For example to show CREATE TABLE command to create the city table use the following statement;
*************************** 1. row ***************************
Table: CountryLanguage
Create Table: CREATE TABLE `countrylanguage` (
` Country` char(3) NOT NULL,
`Language` char(30) NOT NULL,
`IsOfficial` enum('True','False') NOT NULL DEFAULT 'False',
`Percentage` float(3,1) NOT NULL,
PRIMARY KEY (`Country`,`Language`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Lists Language
Spoken'
1 row in set (#.## sec)
Comments
Post a Comment