Home >Database >Mysql Tutorial >How to view the created table in mysql
Mysql method to view the created data table: Use SHOW CREATE TABELE to view the data table. The SHOW CREATE TABLE statement can not only view the definition statement when creating the table, but also view the character number of the table. The code is [SHOW CREATE TABLE TB_GRADE;】
##More related free learning recommendations: mysql tutorial (Video)
Mysql method to view the created data table:
Use SHOW CREATE TABELE to view the data tableIn MySQL, the SHOW CREATE TABLE statement can not only view the definition statement when creating the table, but also the character encoding of the table. The basic syntax format of the SHOW CREATE TABLE statement is as follows:SHOW CREATE TABLE 表名;In the above format, "table name" refers to the name of the data table to be queried. For example, we have previously created a file named tb-gradede For the data table, use the SHOW CREATE TABLE statement to view the tb_grade table. The SQL statement is as follows:
SHOW CREATE TABLE TB_GRADE;The running results are as follows: From the above execution As can be seen from the results, the definition information of the tb_grade data table is displayed, but the displayed results are very confusing. At this time, you can add the parameter "\G" after the table name of the SHOW CREATE TABLE statement to make the display results neat and beautiful. SQL statement For:
SHOW CREATE TABLE TB_GRADE\GNote that there is no ";" at the end of the code, and the execution results are as follows.
The above is the detailed content of How to view the created table in mysql. For more information, please follow other related articles on the PHP Chinese website!