To display the INDEX of a table, run SHOW INDEX query in MySQL with the following syntax.

SHOW INDEX FROM table_name;

The query displays all the INDEX in rows.

There could be one or more INDEX to a table.

For example, to show INDEX of students table, we run the following query.

SHOW INDEX FROM students;
MySQL show all index of a table

Here’s a little tip for you. In the above picture, you see all the rows like a sentence. To improve the readability of columns and their values, suffix the query with \G.

SHOW INDEX FROM students \G;
MySQL SHOW INDEX FROM table