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.
ADVERTISEMENT
SHOW INDEX FROM students;
![MySQL show all index of a table](https://www.tutorialkart.com/wp-content/uploads/2018/12/mysql-show-all-index-from-table.png)
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](https://www.tutorialkart.com/wp-content/uploads/2018/12/mysql-show-index.png)