Home > Database > Mysql Tutorial > How to view the created table in mysql

How to view the created table in mysql

coldplay.xixi
Release: 2020-10-20 11:55:59
Original
11728 people have browsed it

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;】

How to view the created table in mysql

##More related free learning recommendations: mysql tutorial (Video)

Mysql method to view the created data table:

Use SHOW CREATE TABELE to view the data table

In 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 表名;
Copy after login

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;
Copy after login

The running results are as follows:

How to view the created table in mysql

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\G
Copy after login

Note that there is no ";" at the end of the code, and the execution results are as follows.

How to view the created table in mysql

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template