SHOW INDEXES Statement

The SHOW INDEXES statement provides the list of indexes present on the specified table.

Syntax

show_indexes_statement ::=
    SHOW [AS JSON] INDEXES ON table_name

Semantics

If you want the output to be in JSON format, you can specify the optional AS JSON.

Example 1 - Show Indexes

The following statement lists the indexes present on the UserInfo table.

SHOW INDEXES ON UserInfo

Output:

indexes
   idx_phones
   idx_income1

Example 2 - Show Indexes

The following statement lists the indexes present on the UserInfo table in JSON format.

SHOW AS JSON INDEXES ON UserInfo

Output:

{"indexes"
        : ["idx_phones","idx_income1"]}