文档首页
MySQL 8.4 参考手册
8.4 中文镜像

MySQL 8.4 参考手册 · 中文镜像

正文为中文,英文原文默认隐藏。点击任意中文段落即可展开 / 收起对应英文原文。

打开官方英文原文 ↗

译文由机器翻译生成,仅供理解参考;有疑问请以官方英文原文为准。

中文点击中文段落可显示 / 隐藏英文原文本页译文覆盖 86%

28.4.11 INFORMATION_SCHEMA INNODB_FIELDS 表28.4.11 The INFORMATION_SCHEMA INNODB_FIELDS Table

INNODB_FIELDS 表提供有关 InnoDB 索引的关键列(字段)的元数据。The INNODB_FIELDS table provides metadata about the key columns (fields) of InnoDB indexes.

有关相关的使用信息和示例,请参见 第 17.15.3 节,“InnoDB INFORMATION_SCHEMA 模式对象表”。For related usage information and examples, see Section 17.15.3, “InnoDB INFORMATION_SCHEMA Schema Object Tables”.

INNODB_FIELDS 表有以下列:The INNODB_FIELDS table has these columns:

  • INDEX_ID

    与该键字段相关联的索引标识符;值与 INNODB_INDEXES.INDEX_ID 相同。An identifier for the index associated with this key field; the same value as INNODB_INDEXES.INDEX_ID.

  • NAMENAME

    表中原始列的名称;值与 INNODB_COLUMNS.NAME 相同。The name of the original column from the table; the same value as INNODB_COLUMNS.NAME.

  • POS

    键字段在索引中的序号位置,从 0 开始并按顺序递增。当列被删除时,剩余列将重新排序,以确保序列没有空缺。The ordinal position of the key field within the index, starting from 0 and incrementing sequentially. When a column is dropped, the remaining columns are reordered so that the sequence has no gaps.

示例Example

mysql> SELECT * FROM INFORMATION_SCHEMA.INNODB_FIELDS WHERE INDEX_ID = 117\G
*************************** 1. row ***************************
INDEX_ID: 117
    NAME: col1
     POS: 0

备注Notes

  • 你必须拥有 PROCESS 权限才能查询此表。You must have the PROCESS privilege to query this table.

  • 使用 INFORMATION_SCHEMA COLUMNS 表或 SHOW COLUMNS 语句查看关于此表列的更多信息,包括数据类型和默认值。Use the INFORMATION_SCHEMA COLUMNS table or the SHOW COLUMNS statement to view additional information about the columns of this table, including data types and default values.