{"url":"https://unageanu.hatenablog.com/entry/20081107/1226049739","provider_name":"Hatena Blog","image_url":null,"categories":["SQL"],"height":"190","blog_title":"\u3046\u306a\u306e\u65e5\u8a18","blog_url":"https://unageanu.hatenablog.com/","description":"\u5171\u901a\u8868\u5f0f\u3092\u4f7f\u3046\u3068\u3001\u691c\u7d22\u7d50\u679c\u3092\u540d\u524d\u4ed8\u304d\u306e\u8868\u3068\u3057\u3066\u5b9a\u7fa9\u3057\u3066\u3001\u5f8c\u306b\u7d9a\u304fselect\u6587\u3067\u53c2\u7167\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 \u4f8b\u3048\u3070\u6b21\u306e\u3088\u3046\u306aSQL\u306f\u3001 select * from ( select distinct * from A ) as X order by case when id is null then 0 else 1 end, id \u5171\u901a\u8868\u5f0f\u3092\u4f7f\u3063\u3066\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u66f8\u304f\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 with X as ( select distinct * from A ) select * from X order by case when id is null then 0 else 1 end, id \u8868\u2026","width":"100%","type":"rich","author_name":"unageanu","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Funageanu.hatenablog.com%2Fentry%2F20081107%2F1226049739\" title=\" \u5171\u901a\u8868\u5f0f - \u3046\u306a\u306e\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","version":"1.0","provider_url":"https://hatena.blog","title":" \u5171\u901a\u8868\u5f0f","author_url":"https://blog.hatena.ne.jp/unageanu/","published":"2008-11-07 18:22:19"}