Home > Database > Mysql Tutorial > body text

What information does SHOW TABLE display in MySQL?

WBOY
Release: 2023-08-26 18:05:21
forward
1312 people have browsed it

MySQL中SHOW TABLE显示什么信息

In MySQL, the SHOW TABLE STATUS command displays the table name, engine, version, number of rows, checksum and other information −

Example

First let's create a table. Here, we are using the MyISAM engine. The query to create the table is as follows -

mysql> create table Post_Demo
   -> (
   -> PostId int,
   -> PostName varchar(100),
   -> PostDate datetime,
   -> PRIMARY KEY(PostId)
   -> )ENGINE = MyISAM;
Query OK, 0 rows affected (0.28 sec)
Copy after login

Now you can use the SHOW TABLE command to check the status of the table. The query is as follows −

mysql> show table status where Name = 'Post_Demo'\G
Copy after login

Output

*************************** 1. row ***************************
Name: post_demo
          Engine: MyISAM
         Version: 10
      Row_format: Dynamic
            Rows: 0
  Avg_row_length: 0
     Data_length: 0
 Max_data_length: 281474976710655
    Index_length: 1024
       Data_free: 0
Auto_increment: 1
   Create_time: 2019-02-12 16:27:26
    Update_time: 2019-02-12 16:27:26
    Check_time: NULL
      Collation: utf8_general_ci
      Checksum: NULL
Create_options:
       Comment:
1 row in set (0.00 sec)
Copy after login

The above is the detailed content of What information does SHOW TABLE display in MySQL?. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
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