Last answered:

27 Nov 2023

Posted on:

14 Nov 2023

0

find a index in table

How to know which column in table has index? There is no information in DDL about index in Unique Key column

1 answers ( 0 marked as helpful)
Instructor
Posted on:

27 Nov 2023

0

Hi Hamed!
Thanks for reaching out.


In MySQL, you can use the following query to list all indexes for a table:

SHOW INDEXES FROM your_table_name;

This query will give you information about all the indexes on a table, including which columns are indexed. Remember to replace 'your_table_name' with the actual name of your table.


Hope this helps.
Best,
Tsvetelin

Submit an answer