Computer >> Computer tutorials >  >> Programming >> MySQL

Show/view indexes in a MySQL Database


To view indexes, the syntax is as follows −

select *from information_schema.statistics where table_schema= yourDatabaseName;

Here, I am using the database ‘web’. The query is as follows to show/view indexes −

select *from information_schema.statistics where table_schema= 'web';

This will produce the following output. All the tables in the ”Web” database with the indexes info is visible −

Show/view indexes in a MySQL Database

Show/view indexes in a MySQL Database