{"id":1808,"date":"2013-05-30T02:49:31","date_gmt":"2013-05-30T02:49:31","guid":{"rendered":"http:\/\/www.withdata.com\/ad\/?p=1808"},"modified":"2017-04-20T10:57:02","modified_gmt":"2017-04-20T10:57:02","slug":"how-to-get-column-names-from-mysql-table","status":"publish","type":"post","link":"https:\/\/www.withdata.com\/blog\/mysql\/how-to-get-column-names-from-mysql-table.html","title":{"rendered":"How to get column names from Mysql table"},"content":{"rendered":"<p>We can use <strong>information_schema.columns<\/strong> for getting column information<\/p>\n<p>SELECT column_name FROM information_schema.columns WHERE table_schema = &#8216;My_Schema_Name&#8217; AND table_name = &#8216;My_Table_Name&#8217;<\/p>\n<p>See also:<\/p>\n<p><a href=\"http:\/\/www.withdata.com\/blog\/sql%20server\/how-to-get-column-names-from-sql-server-table.html\">How to get column names from Sql Server table<\/a><\/p>\n<p><a href=\"http:\/\/www.withdata.com\/blog\/db2\/how-to-get-column-names-from-db2-table.html\">How to get column names from DB2 table<\/a><\/p>\n<p><a href=\"http:\/\/www.withdata.com\/blog\/oracle\/how-to-get-column-names-from-oracle-table.html\">How to get column names from Oracle table<\/a><\/p>\n<p><a href=\"http:\/\/www.withdata.com\/blog\/postgresql\/how-to-get-column-names-from-postgresql-table.html\">How to get column names from PostgreSQL table<\/a><\/p>\n<p><a href=\"http:\/\/www.withdata.com\/blog\/sqlite\/how-to-get-column-names-from-sqlite-table.html\">How to get column names from SQLite table<\/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>We can use information_schema.columns for getting column information SELECT column_name FROM information_schema.columns WHERE table_schema = &#8216;My_Schema_Name&#8217; AND table_name = &#8216;My_Table_Name&#8217; See also: How to get column names from Sql Server table How to get column names from DB2 table How to get column names from Oracle table How to get column names from PostgreSQL table [&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":[230,1323],"class_list":["post-1808","post","type-post","status-publish","format-standard","hentry","category-mysql","tag-get-column-names","tag-mysql"],"_links":{"self":[{"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/posts\/1808","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=1808"}],"version-history":[{"count":5,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/posts\/1808\/revisions"}],"predecessor-version":[{"id":6437,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/posts\/1808\/revisions\/6437"}],"wp:attachment":[{"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/media?parent=1808"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/categories?post=1808"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/tags?post=1808"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}