{"id":225,"date":"2021-11-18T08:12:16","date_gmt":"2021-11-18T08:12:16","guid":{"rendered":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/?p=225"},"modified":"2021-11-18T08:12:16","modified_gmt":"2021-11-18T08:12:16","slug":"renaming-a-column","status":"publish","type":"post","link":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/2021\/11\/18\/renaming-a-column\/","title":{"rendered":"Renaming a column"},"content":{"rendered":"\n<p>Rename example command is:<strong> ALTER TABLE classics CHANGE type category VARCHAR(16);<\/strong><\/p>\n\n\n\n<p>Note the addition of VARCHAR(16) on the end of this command. That\u2019s because the CHANGE keyword requires the data type to be specified, even if you don\u2019t intend to change it, and VARCHAR(16) was the data type specified when that column was initially created as type.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Rename example command is: ALTER TABLE classics CHANGE type category VARCHAR(16); Note the addition of VARCHAR(16) on the end of this command. That\u2019s because the CHANGE keyword requires the data type to be specified, even if you don\u2019t intend to change it, and VARCHAR(16) was the data type specified when that column was initially created &hellip; <a href=\"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/2021\/11\/18\/renaming-a-column\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Renaming a column<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/225"}],"collection":[{"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=225"}],"version-history":[{"count":1,"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/225\/revisions"}],"predecessor-version":[{"id":226,"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/225\/revisions\/226"}],"wp:attachment":[{"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=225"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=225"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=225"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}