{"id":5469,"date":"2016-10-24T08:56:47","date_gmt":"2016-10-24T08:56:47","guid":{"rendered":"http:\/\/www.withdata.com\/blog\/?p=5469"},"modified":"2017-04-20T11:00:25","modified_gmt":"2017-04-20T11:00:25","slug":"how-to-get-index-column-names-of-a-table-from-mysql","status":"publish","type":"post","link":"https:\/\/www.withdata.com\/blog\/mysql\/how-to-get-index-column-names-of-a-table-from-mysql.html","title":{"rendered":"How to get index column names of a table from MySQL"},"content":{"rendered":"<p><code>SELECT INDEX_NAME,COLUMN_NAME<br \/>\nFROM INFORMATION_SCHEMA.STATISTICS<br \/>\nWHERE TABLE_SCHEMA = 'my_schema_name'<br \/>\nAND TABLE_NAME = 'my_table_name'<\/code><\/p>\n<p>See also:<\/p>\n<p><a href=\"http:\/\/www.withdata.com\/blog\/db2\/how-to-get-index-column-names-of-a-table-from-db2.html\">How to get index column names of a table from DB2<\/a><\/p>\n<p><a href=\"http:\/\/www.withdata.com\/blog\/sql-server\/how-to-get-index-column-names-of-a-table-from-sql-server.html\">How to get index column names of a table from SQL Server<\/a><\/p>\n<p><a href=\"http:\/\/www.withdata.com\/blog\/postgresql\/how-to-get-index-column-names-of-a-table-from-postgresql.html\">How to get index column names of a table from PostgreSQL<\/a><\/p>\n<p><a href=\"http:\/\/www.withdata.com\/blog\/sqlite\/how-to-get-index-column-names-of-a-table-from-sqlite.html\">How to get index column names of a table from SQLite<\/a><\/p>\n<p><a href=\"http:\/\/www.withdata.com\/blog\/oracle\/how-to-get-index-column-names-of-a-table-from-oracle.html\">How to get index column names of a table from Oracle<\/a><\/p>\n<p>Some MySQL tools you can try: <a href=\"https:\/\/www.withdata.com\/mysql\/\"> https:\/\/www.withdata.com\/mysql\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>SELECT INDEX_NAME,COLUMN_NAME FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA = &#8216;my_schema_name&#8217; AND TABLE_NAME = &#8216;my_table_name&#8217; See also: How to get index column names of a table from DB2 How to get index column names of a table from SQL Server How to get index column names of a table from PostgreSQL How to get index column names of [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29],"tags":[1720,1323],"class_list":["post-5469","post","type-post","status-publish","format-standard","hentry","category-mysql","tag-get-index-columns","tag-mysql"],"_links":{"self":[{"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/posts\/5469","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/comments?post=5469"}],"version-history":[{"count":3,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/posts\/5469\/revisions"}],"predecessor-version":[{"id":6442,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/posts\/5469\/revisions\/6442"}],"wp:attachment":[{"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/media?parent=5469"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/categories?post=5469"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/tags?post=5469"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}