{"id":6106,"date":"2021-02-17T11:32:29","date_gmt":"2021-02-17T02:32:29","guid":{"rendered":"https:\/\/nsme.red\/wp\/?p=6106"},"modified":"2021-02-17T11:34:25","modified_gmt":"2021-02-17T02:34:25","slug":"%e7%a9%ba%e7%99%bd%e3%82%84null%e3%81%ae%e3%83%87%e3%83%bc%e3%82%bf%e3%82%92%e5%be%8c%e3%82%8d%e3%81%ab","status":"publish","type":"post","link":"https:\/\/core.nsme.net\/notes\/mysql\/order-by\/6106\/","title":{"rendered":"\u7a7a\u767d\u3084NULL\u306e\u30c7\u30fc\u30bf\u3092\u5f8c\u308d\u306b"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>SELECT * FROM table_name ORDER BY\ncase\n    when type is NULL then '2'\n    when type = '' then '1'\n    else '0'\nend, type ASC;<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT * FROM wp_saiyou WHERE 1 ORDER BY case when baitai='' then '1' else '0' end, baitai<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[44],"tags":[],"class_list":["post-6106","post","type-post","status-publish","format-standard","hentry","category-order-by"],"acf":[],"_links":{"self":[{"href":"https:\/\/core.nsme.net\/notes\/wp-json\/wp\/v2\/posts\/6106","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/core.nsme.net\/notes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/core.nsme.net\/notes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/core.nsme.net\/notes\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/core.nsme.net\/notes\/wp-json\/wp\/v2\/comments?post=6106"}],"version-history":[{"count":2,"href":"https:\/\/core.nsme.net\/notes\/wp-json\/wp\/v2\/posts\/6106\/revisions"}],"predecessor-version":[{"id":6108,"href":"https:\/\/core.nsme.net\/notes\/wp-json\/wp\/v2\/posts\/6106\/revisions\/6108"}],"wp:attachment":[{"href":"https:\/\/core.nsme.net\/notes\/wp-json\/wp\/v2\/media?parent=6106"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/core.nsme.net\/notes\/wp-json\/wp\/v2\/categories?post=6106"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/core.nsme.net\/notes\/wp-json\/wp\/v2\/tags?post=6106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}