The TABLES view contains details about tables in databases. Values in the columns related to table statistics are cached.
| Column | Description |
|---|---|
TABLE_CATALOG |
The catalog where the table resides. This value is always def. |
TABLE_SCHEMA |
The schema (database) where the table resides. |
TABLE_NAME |
The name of the table. |
TABLE_TYPE |
BASE TABLE for tables, VIEW for views, SYSTEM VIEW for INFORMATION_SCHEMA tables. Excludes TEMPORARY tables. |
ENGINE |
The storage engine for the table. For partitioned tables, it shows the storage engine used for all partitions. |
VERSION |
Not in use. |
ROW_FORMAT |
The row-storage format: Fixed, Dynamic, Compressed, Redundant, or Compact. For MyISAM, Dynamic corresponds to Packed. |
TABLE_ROWS |
The number of rows in the table. For engines like MyISAM, it’s accurate; for others like InnoDB, it’s an estimate. NULL for INFORMATION_SCHEMA tables. |
AVG_ROW_LENGTH |
The average row length. |
DATA_LENGTH |
The data file size in bytes for MyISAM, or space allocated for the clustered index for InnoDB. |
MAX_DATA_LENGTH |
The maximum length of the data file for MyISAM. Not in use for InnoDB. |
INDEX_LENGTH |
Index file length for MyISAM, or space allocated for non-clustered indexes for InnoDB. |
DATA_FREE |
Allocated but unused bytes. For InnoDB, it’s free space in the tablespace. For NDB Cluster, the unused disk space. |
AUTO_INCREMENT |
The next AUTO_INCREMENT value for the table. |
CREATE_TIME |
The creation timestamp of the table. |
UPDATE_TIME |
The last update timestamp of the table. NULL for some engines. |
CHECK_TIME |
The timestamp of the last table check. NULL for partitioned InnoDB tables. |
TABLE_COLLATION |
The default collation for the table. |
CHECKSUM |
The live checksum value, if available. |
CREATE_OPTIONS |
Extra options used in the CREATE TABLE statement: partitioned, ENCRYPTION, or other retained options. |
TABLE_COMMENT |
The comment added during table creation, or information about why MySQL can’t access the table information. |
For more information, see the MySQL documentation: The INFORMATION_SCHEMA TABLES Table.