Show/view indexes in a MySQL Database

MySQLMySQLi 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 −

raja
Published on 25-Sep-2019 10:24:06
Advertisements