{"author_url":"https://blog.hatena.ne.jp/toft/","published":"2008-05-28 20:24:53","image_url":null,"height":"190","description":"union \u3068\u304b\u3057\u305f\u308a\u3059\u308b\u6642\u3001where \u53e5\u306b\u6307\u5b9a\u3059\u308b\u7b87\u6240\u304c\u5897\u3048\u308b\u2192\u30d7\u30ec\u30fc\u30b9\u30db\u30eb\u30c0\u306e\u6570\u304c\u5897\u3048\u308b\u3001\u3067\u6c17\u6301\u3061\u60aa\u3044\u306e\u3092\u306a\u3093\u3068\u304b\u3057\u305f\u3044\u3002 \u3067\u3001MS SQL Server \u3092\u3044\u3058\u3063\u3066\u305f\u3068\u304d\u306f DECLARE \u3057\u305f\u5909\u6570\u306b SET \u3057\u3066\u305d\u308c\u3092\u4f7f\u3063\u3066\u305f\u308a\u3057\u3066\u305f\u306e\u3067\u3001\u540c\u3058\u3053\u3068\u3067\u304d\u306a\u3044\u304b\u306a\u30fc\u3068\u601d\u3063\u3066\u8abf\u3079\u305f\u3089\u51fa\u6765\u305f\u306e\u3067\u30e1\u30e2\u3002 SELECT hoge.id, fuga.name FROM ( SELECT id FROM foo WHERE col1 = @a:=1 AND col2 = @b:=1 UNION SELECT id FROM bar WHERE col1 = @a AND col2 = @b ) ho\u2026","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftoft.hatenadiary.org%2Fentry%2F20080528%2F1211973893\" title=\"SQL \u306e\u4e2d\u3067\u5909\u6570\u3092\u4f7f\u3046\uff08MySQL\uff09 - \u30b9\u30ea\u30fc\u30c0\u30a6\u30f3\u30d6\u30ed\u30b0\" 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","title":"SQL \u306e\u4e2d\u3067\u5909\u6570\u3092\u4f7f\u3046\uff08MySQL\uff09","blog_url":"https://toft.hatenadiary.org/","categories":[],"width":"100%","type":"rich","url":"https://toft.hatenadiary.org/entry/20080528/1211973893","blog_title":"\u30b9\u30ea\u30fc\u30c0\u30a6\u30f3\u30d6\u30ed\u30b0","provider_name":"Hatena Blog","provider_url":"https://hatena.blog","author_name":"toft"}