list index mysql cli 1

list index mysql cli

SHOW INDEX FROM table_name FROM db_name;

Here is what the above code is Doing:
1. We’re selecting the table name, column name, and index type from the information_schema.statistics table.
2. We’re filtering the results to only show us the indexes for the table we’re interested in.
3. We’re filtering the results to only show us the indexes for the database we’re interested in.

Similar Posts