SHOW INDEXES [FROM|IN]

    ShowIndexStmt:

    ShowIndexKwd:

    FromOrIn:

    FromOrIn

    TableName:

    ShowLikeOrWhereOpt:

    1. Query OK, 0 rows affected (0.12 sec)
    1. +-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
    2. | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
    3. +-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
    4. | t1 | 0 | PRIMARY | 1 | id | A | 0 | NULL | NULL | | BTREE | | |
    5. +-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
    6. 2 rows in set (0.00 sec)
    1. +-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
    2. | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
    3. +-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
    4. | t1 | 0 | PRIMARY | 1 | id | A | 0 | NULL | NULL | | BTREE | | |
    5. | t1 | 1 | col1 | 1 | col1 | A | 0 | NULL | NULL | YES | BTREE | | |
    6. 2 rows in set (0.00 sec)
    1. | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
    2. +-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
    3. | t1 | 0 | PRIMARY | 1 | id | A | 0 | NULL | NULL | | BTREE | | |
    4. | t1 | 1 | col1 | 1 | col1 | A | 0 | NULL | NULL | YES | BTREE | | |
    5. +-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+

    SHOW INDEXES [FROM|IN] 语句与 MySQL 完全兼容。如发现任何兼容性差异,请在 GitHub 上提交 。