{"id":68,"date":"2016-10-28T07:46:06","date_gmt":"2016-10-28T07:46:06","guid":{"rendered":"http:\/\/techliness.com\/?p=68"},"modified":"2016-10-28T07:54:15","modified_gmt":"2016-10-28T07:54:15","slug":"how-to-check-if-a-column-with-a-particular-name-exists-in-a-mysql-database","status":"publish","type":"post","link":"https:\/\/techliness.com\/?p=68","title":{"rendered":"How to check if a column with a particular name exists in a MySQL database"},"content":{"rendered":"<p>So,<br \/>\nEvery now and then one runs into a situation where one has an idea of a column of a MySQL table.<br \/>\nA quick way to narrow down on the list of tables is to do a search using the part of the column name that one remembers.<\/p>\n<p><code><br \/>\nSELECT DISTINCT TABLE_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME LIKE \"%string%\";<\/code><\/p>\n<p>Where &#8220;string&#8221; is the string one is searching for.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So, Every now and then one runs into a situation where one has an idea of a column of a MySQL table. A quick way to narrow down on the list of tables is to do a search using the part of the column name that one remembers. SELECT DISTINCT TABLE_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME &hellip; <a href=\"https:\/\/techliness.com\/?p=68\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to check if a column with a particular name exists in a MySQL database&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/techliness.com\/index.php?rest_route=\/wp\/v2\/posts\/68"}],"collection":[{"href":"https:\/\/techliness.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techliness.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techliness.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techliness.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=68"}],"version-history":[{"count":4,"href":"https:\/\/techliness.com\/index.php?rest_route=\/wp\/v2\/posts\/68\/revisions"}],"predecessor-version":[{"id":73,"href":"https:\/\/techliness.com\/index.php?rest_route=\/wp\/v2\/posts\/68\/revisions\/73"}],"wp:attachment":[{"href":"https:\/\/techliness.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=68"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techliness.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=68"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techliness.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=68"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}