PDF (A4) - 43.4Mb
Man Pages (TGZ) - 297.2Kb
Man Pages (Zip) - 402.4Kb
Info (Gzip) - 4.3Mb
Info (Zip) - 4.3Mb
MySQL Globalization
MySQL Information Schema
MySQL Installation Guide
Security in MySQL
Starting and Stopping MySQL
MySQL and Linux/Unix
MySQL and Windows
MySQL and macOS
MySQL and Solaris
Building MySQL from Source
MySQL Restrictions and Limitations
MySQL Partitioning
MySQL Tutorial
MySQL Performance Schema
MySQL Replication
Using the MySQL Yum Repository
MySQL NDB Cluster 8.0
TheINNODB_TABLES table provides metadata aboutInnoDB tables.
For related usage information and examples, seeSection 17.15.3, “InnoDB INFORMATION_SCHEMA Schema Object Tables”.
TheINNODB_TABLES table has these columns:
TABLE_IDAn identifier for the
InnoDBtable. This value is unique across all databases in the instance.NAMEThe name of the table, preceded by the schema (database) name where appropriate (for example,
test/t1). Names of databases and user tables are in the same case as they were originally defined, possibly influenced by thelower_case_table_namessetting.FLAGA numeric value that represents bit-level information about table format and storage characteristics.
N_COLSThe number of columns in the table. The number reported includes three hidden columns that are created by
InnoDB(DB_ROW_ID,DB_TRX_ID, andDB_ROLL_PTR). The number reported also includesvirtual generated columns, if present.SPACEAn identifier for the tablespace where the table resides. 0 means the
InnoDBsystem tablespace. Any other number represents either afile-per-table tablespace or a general tablespace. This identifier stays the same after aTRUNCATE TABLEstatement. For file-per-table tablespaces, this identifier is unique for tables across all databases in the instance.ROW_FORMATThe table's row format (
Compact,Redundant,Dynamic, orCompressed).ZIP_PAGE_SIZEThe zip page size. Applies only to tables with a row format of
Compressed.SPACE_TYPEThe type of tablespace to which the table belongs. Possible values include
Systemfor the system tablespace,Generalfor general tablespaces, andSinglefor file-per-table tablespaces. Tables assigned to the system tablespace usingCREATE TABLEorALTER TABLETABLESPACE=innodb_systemhave aSPACE_TYPEofGeneral. For more information, seeCREATE TABLESPACE.INSTANT_COLSThe number of columns that existed before the first instant column was added using
ALTER TABLE ... ADD COLUMNwithALGORITHM=INSTANT. This column is no longer used as of MySQL 8.0.29 but continues to show information for tables with columns that were added instantly prior to MySQL 8.0.29.TOTAL_ROW_VERSIONSThe number of row versions for the table. The initial value is 0. The value is incremented by
ALTER TABLE ... ALGORITHM=INSTANToperations that add or remove columns. When a table with instantly added or dropped columns is rebuilt due to a table-rebuildingALTER TABLEorOPTIMIZE TABLEoperation, the value is reset to 0. For more information, seeColumn Operations.
Example
mysql> SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLES WHERE TABLE_ID = 214\G*************************** 1. row *************************** TABLE_ID: 1064 NAME: test/t1 FLAG: 33 N_COLS: 6 SPACE: 3 ROW_FORMAT: Dynamic ZIP_PAGE_SIZE: 0 SPACE_TYPE: Single INSTANT_COLS: 0TOTAL_ROW_VERSIONS: 3Notes
You must have the
PROCESSprivilege to query this table.Use the
INFORMATION_SCHEMACOLUMNStable or theSHOW COLUMNSstatement to view additional information about the columns of this table, including data types and default values.
PDF (A4) - 43.4Mb
Man Pages (TGZ) - 297.2Kb
Man Pages (Zip) - 402.4Kb
Info (Gzip) - 4.3Mb
Info (Zip) - 4.3Mb
MySQL Globalization
MySQL Information Schema
MySQL Installation Guide
Security in MySQL
Starting and Stopping MySQL
MySQL and Linux/Unix
MySQL and Windows
MySQL and macOS
MySQL and Solaris
Building MySQL from Source
MySQL Restrictions and Limitations
MySQL Partitioning
MySQL Tutorial
MySQL Performance Schema
MySQL Replication
Using the MySQL Yum Repository
MySQL NDB Cluster 8.0