SHOW TABLE STATUS
SHOW TABLE STATUS is a SQL statement in the MySQL Specific category. MySQL: shows detailed table information: engine, row count, data length, index length, collation, etc. The syntax is SHOW TABLE STATUS [FROM database] [LIKE 'pattern'];. It returns table status info. A typical example: SHOW TABLE STATUS FROM my_company LIKE 'employees'\G; -- Name: employees -- Engine: InnoDB -- Rows: 1050 (estimated) -- Data_length: 524288 (bytes) -- Index_length: 163840 -- Create_time: 2026-01-15 10:30:00 -- Collation: utf8mb4_unicode_ci -- Find largest tables: SELECT table_name, ROUND(((data_length + index_length) / 1024 / 1024), 2) AS size_mb FROM information_schema.tables WHERE table_schema = 'my_company' ORDER BY size_mb DESC; A close relative is AUTO_INCREMENT, which mySQL auto-generates sequential integer values for this column. Commonly used with PRIMARY KEY. A close relative is ENGINE, which specifies the MySQL storage engine. InnoDB (default) supports transactions and foreign keys. MyISAM is faster for read-heavy. A close relative is LAST_INSERT_ID(), which returns the AUTO_INCREMENT value generated by the most recent INSERT in the current connection.