Note
This view is introduced since OceanBase Database V1.4.
Purpose
The information_schema.TABLES view displays information about tables.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| TABLE_CATALOG | varchar(512) | NO | The catalog of the table. |
| TABLE_SCHEMA | varchar(64) | NO | The name of the database. |
| TABLE_NAME | varchar(64) | NO | The name of the table. |
| TABLE_TYPE | varchar(64) | NO | The type of the table. |
| ENGINE | varchar(64) | NO | The storage engine type. |
| VERSION | bigint(0) unsigned | NO | The version. |
| 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, in bytes, calculated in macroblocks.
NoteIn V4.3.x, this field is effective starting from V4.3.5. |
| 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, in bytes, calculated in macroblocks.
NoteIn V4.3.x, this field is effective starting from V4.3.5. |
| 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 last update time of the table. |
| CHECK_TIME | datetime | NO | The last 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 remarks of the table. |
| AUTO_SPLIT | varchar(16) | NO | Indicates whether automatic partitioning is enabled for the table. Valid values:
NoteThis field was introduced in V4.3.4. |
| AUTO_SPLIT_TABLET_SIZE | bigint(20) unsigned | NO | The threshold for automatic partition splitting. If the AUTO_SPLIT field is set to FALSE, the AUTO_SPLIT_TABLET_SIZE field is set to 0.
NoteThis field was introduced in V4.3.4. |
| ORGANIZATION | varchar(12) | NO | Indicates the table organization method. Valid values:
NoteFor OceanBase Database V4.3.5, this field was introduced starting from 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: db_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-24 10:32:10
UPDATE_TIME: 2025-02-24 10:32:10
CHECK_TIME: NULL
TABLE_COLLATION: utf8mb4_general_ci
CHECKSUM: NULL
CREATE_OPTIONS: NULL
TABLE_COMMENT:
AUTO_SPLIT: FALSE
AUTO_SPLIT_TABLET_SIZE: 0
ORGANIZATION: HEAP
1 row in set