{"id":263,"date":"2011-11-15T10:50:36","date_gmt":"2011-11-15T10:50:36","guid":{"rendered":"http:\/\/nicholshayes.co.uk\/blog\/?p=263"},"modified":"2013-10-31T15:56:11","modified_gmt":"2013-10-31T15:56:11","slug":"output-table-column-names-to-a-file","status":"publish","type":"post","link":"http:\/\/nicholshayes.co.uk\/blog\/?p=263","title":{"rendered":"Output table column names to a file"},"content":{"rendered":"<p>I&#8217;m working on tool to transfer data from one database to another. I wanted a list of column names in a file so that I had a list I could work through. After a hunt around the MySQL docs I found <a href=\"http:\/\/dev.mysql.com\/doc\/refman\/5.0\/en\/mysqlshow.html\">mysqlshow<\/a>, which works a treat:<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">&nbsp; mysqlshow -u username -p password database_name table_name &gt; output.txt<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m working on tool to transfer data from one database to another. I wanted a list of column names in a file so that I had a list I could work through. After a hunt around the MySQL docs I &hellip; <a href=\"http:\/\/nicholshayes.co.uk\/blog\/?p=263\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[9],"tags":[],"_links":{"self":[{"href":"http:\/\/nicholshayes.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/263"}],"collection":[{"href":"http:\/\/nicholshayes.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/nicholshayes.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/nicholshayes.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/nicholshayes.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=263"}],"version-history":[{"count":4,"href":"http:\/\/nicholshayes.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/263\/revisions"}],"predecessor-version":[{"id":469,"href":"http:\/\/nicholshayes.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/263\/revisions\/469"}],"wp:attachment":[{"href":"http:\/\/nicholshayes.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=263"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/nicholshayes.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=263"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/nicholshayes.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=263"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}