15.7.7.38 SHOW TABLE STATUS Statement (original) (raw)

15.7.7.38 SHOW TABLE STATUS Statement

SHOW TABLE STATUS
    [{FROM | IN} db_name]
    [LIKE 'pattern' | WHERE expr]

SHOW TABLE STATUS works likeSHOW TABLES, but provides a lot of information about each non-TEMPORARY table. You can also get this list using the mysqlshow --status db_name command. The LIKE clause, if present, indicates which table names to match. TheWHERE clause can be given to select rows using more general conditions, as discussed inSection 28.8, “Extensions to SHOW Statements”.

This statement also displays information about views.

SHOW TABLE STATUS output has these columns:

SELECT SUM(DATA_FREE)  
    FROM  INFORMATION_SCHEMA.PARTITIONS  
    WHERE TABLE_SCHEMA = 'mydb'  
    AND   TABLE_NAME   = 'mytable';  

For more information, seeSection 28.3.21, “The INFORMATION_SCHEMA PARTITIONS Table”.

Notes

Table information is also available from theINFORMATION_SCHEMA TABLES table. SeeSection 28.3.38, “The INFORMATION_SCHEMA TABLES Table”.