mysql 語句如下
SELECT
TABLE_NAME AS tableName,
TABLE_COMMENT AS tableComment,
CREATE_TIME AS createTime
FROM
information_schema.TABLES
WHERE
TABLE_SCHEMA = (SELECT DATABASE ()) #where 條件表示查詢當前數據庫
下面表格各字段含義如下
| 字段 | 含義 |
| Table_catalog | 數據表登記目錄 |
| Table_schema | 數據表所屬的數據庫名 |
| Table_name | 表名稱 |
| Table_type | 表類型[system view|base table] |
| Engine | 使用的數據庫引擎[MyISAM|CSV|InnoDB] |
| Version | 版本,默認值10 |
| Row_format | 行格式[Compact|Dynamic|Fixed] |
| Table_rows | 表里所存多少行數據 |
| Avg_row_length | 平均行長度 |
| Data_length | 數據長度 |
| Max_data_length | 最大數據長度 |
| Index_length | 索引長度 |
| Data_free | 空間碎片 |
| Auto_increment | 做自增主鍵的自動增量當前值 |
| Create_time | 表的創建時間 |
| Update_time | 表的更新時間 |
| Check_time | 表的檢查時間 |
| Table_collation | 表的字符校驗編碼集 |
| Checksum | 校驗和 |
| Create_options | 創建選項 |
| Table_comment | 表的注釋、備注 |
