MySQL 中的 SHOW TABLE 会显示哪些信息
mysqlmysqli database更新于 2025/8/30 20:28:17
MySQL 中的 SHOW TABLE STATUS 显示表的名称、引擎、版本、行、校验和等 −
示例
让我们首先创建一个表。这里,我们使用 MyISAM 引擎。创建表的查询如下 −
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)
现在您可以使用 SHOW TABLE 命令检查表状态。查询如下 −
mysql> show table status where Name = 'Post_Demo'\G
输出
*************************** 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)
相关文章
有用资源
mysql 参考教程 - 该教程包含有关 mysql 的更多信息:https://www.cainiaomax.com/mysql/

