7 Sept 2023

Viewing All Indexes in a MySQL Table

To view all indexes in a MySQL table, use the command:

SHOW INDEX FROM `table_name`;

Replace table_name with the actual name of the table you want to view indexes for.

Additionally, you can employ the command:

SHOW CREATE TABLE table_name;

This will display the complete CREATE TABLE statement, encompassing all indexes, for the specified table.