How To Get A List Of Indexes Of An Existing Table

How To Get A List Of Indexes Of An Existing Table


  • 3 Jan, 2012

    If you want to see the index you have just created for an existing table, you can use the "SHOW INDEX FROM tableName" command to get a list of all indexes in a given table. The tutorial script below shows you a nice example:mysql> SHOW INDEX FROM TIP;+------------+-------------+--------------+-------------+...| Non_unique | Key_name | Seq_in_index | Column_name |...+------------+-------------+--------------+-------------+...| 0 | PRIMARY | 1 | id |...| 1 | tip_subject | 1 | subject |...+------------+-------------+--------------+-------------+...2 rows in set (0.03 sec)It's interesting to see that there is a default index for the primary key column.

    Comments Received:
    Please give your suggestions and feedback:

2009-2016 downloadmela.com. All rights reserved.