|
|
Show indexes for a table with MySQL - Mysql
|
Views : 311
|
|
Tagged in : Mysql
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
MySQL has a SQL query "SHOW INDEX FROM" which returns the indexes from a table.This query is used to get a list of indexes and a list of primary keys for a table with MySQL.
Syntax:
SHOW INDEXES FROM table_name;
Show the primary keys
To just show the primary key for the table run this query:
SHOW INDEXES FROM table_name WHERE Key_name = "PRIMARY";
|
|
By Rekha, On - 2010-01-28 |
|
|
|