📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

information_schema.tables



The information_schema.tables system table is a view that provides metadata about all tables across all databases, including their schema, type, engine, and creation details. It also includes storage metrics such as data length, index length, and row count, offering insights into table structure and usage.

DESCRIBE information_schema.tables; ┌────────────────────────────────────────────────────────────────────────────────────┐ │ Field │ Type │ NullDefault │ Extra │ ├─────────────────┼─────────────────┼────────┼──────────────────────────────┼────────┤ │ table_catalog │ VARCHARNO'' │ │ │ table_schema │ VARCHARNO'' │ │ │ table_name │ VARCHARNO'' │ │ │ table_type │ VARCHARNO'' │ │ │ engine │ VARCHARNO'' │ │ │ create_time │ TIMESTAMPNO'1970-01-01 00:00:00.000000' │ │ │ drop_time │ TIMESTAMP │ YES │ NULL │ │ │ data_length │ BIGINT UNSIGNED │ YES │ NULL │ │ │ index_length │ BIGINT UNSIGNED │ YES │ NULL │ │ │ table_rows │ BIGINT UNSIGNED │ YES │ NULL │ │ │ auto_increment │ NULLNONULL │ │ │ table_collation │ NULLNONULL │ │ │ data_free │ NULLNONULL │ │ │ table_comment │ VARCHARNO'' │ │ └────────────────────────────────────────────────────────────────────────────────────┘

Was this page helpful?