Note
This view is introduced in V1.4.
Purpose
The information_schema.TABLES view displays information about tables.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| TABLE_CATALOG | varchar(512) | NO | The catalog name. |
| TABLE_SCHEMA | varchar(64) | NO | The database name. |
| TABLE_NAME | varchar(64) | NO | The table name. |
| TABLE_TYPE | varchar(64) | NO | The table type. |
| ENGINE | varchar(64) | NO | The storage engine type. |
| VERSION | bigint(0) unsigned | NO | The version number. |
| ROW_FORMAT | varchar(10) | NO | The row format. |
| TABLE_ROWS | bigint(21) unsigned | NO | The number of rows in the table. |
| AVG_ROW_LENGTH | bigint(21) unsigned | NO | The average row length. |
| DATA_LENGTH | bigint(21) unsigned | NO | The data length, which is the storage space occupied by the table, calculated by macroblock size, in bytes.
NoteIn V4.3.x, this field no longer displays as |
| MAX_DATA_LENGTH | bigint(0) unsigned | NO | The maximum data length. |
| INDEX_LENGTH | bigint(0) unsigned | NO | The index length, which is the storage space occupied by non-primary key indexes, calculated by macroblock size, in bytes.
NoteIn V4.3.x, this field no longer displays as |
| DATA_FREE | bigint(0) unsigned | NO | The remaining space size. |
| AUTO_INCREMENT | bigint(0) unsigned | NO | The current auto-increment value. |
| CREATE_TIME | datetime | NO | The creation time of the table. |
| UPDATE_TIME | datetime | NO | The most recent update time of the table. |
| CHECK_TIME | datetime | NO | The most recent check time of the table. |
| TABLE_COLLATION | varchar(32) | NO | The character set collation method of the table. |
| CHECKSUM | bigint(0) unsigned | NO | The checksum. |
| CREATE_OPTIONS | varchar(255) | NO | The creation options. |
| TABLE_COMMENT | text | NO | The table remarks. |
| AUTO_SPLIT | varchar(16) | NO | Specifies whether to enable auto partitioning for the table. Valid values:
NoteThis field is introduced in V4.3.4. |
| AUTO_SPLIT_TABLET_SIZE | bigint(20) unsigned | NO | The threshold for auto partition splitting. If the value of the AUTO_SPLIT field is FALSE, the value of the AUTO_SPLIT_TABLET_SIZE field is 0.
NoteThis field is introduced in V4.3.4. |
| ORGANIZATION | varchar(12) | NO | The table organization mode. Valid values:
NoteFor OceanBase Database V4.3.5, this field is supported to be introduced in V4.3.5 BP1. |
Sample query
Query the details of the t1 table.
SELECT * FROM information_schema.tables WHERE table_name = 't1'\G
The query result is as follows:
*************************** 1. row ***************************
TABLE_CATALOG: def
TABLE_SCHEMA: test
TABLE_NAME: t1
TABLE_TYPE: BASE TABLE
ENGINE: InnoDB
VERSION: NULL
ROW_FORMAT: DYNAMIC
TABLE_ROWS: 0
AVG_ROW_LENGTH: 0
DATA_LENGTH: 0
MAX_DATA_LENGTH: NULL
INDEX_LENGTH: 0
DATA_FREE: NULL
AUTO_INCREMENT: NULL
CREATE_TIME: 2025-02-21 13:59:36
UPDATE_TIME: 2025-02-21 13:59:46
CHECK_TIME: NULL
TABLE_COLLATION: utf8mb4_general_ci
CHECKSUM: NULL
CREATE_OPTIONS: NULL
TABLE_COMMENT:
AUTO_SPLIT: FALSE
AUTO_SPLIT_TABLET_SIZE: 0
ORGANIZATION: INDEX
1 row in set