<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>chamotarooo</author_name>
  <author_url>https://blog.hatena.ne.jp/chamotarooo/</author_url>
  <blog_title>chamotaroooのブログ</blog_title>
  <blog_url>https://chamotaro.hatenablog.com/</blog_url>
  <categories>
    <anon>技術</anon>
  </categories>
  <description>はじめに LEFT OUTER JOIN を書いた。なのに結果が想定と違う。 NULL が返ってきた。行が消えた。あるいは行が増えすぎた。外部結合は「なんとなく」で書くと必ず躓く。あなたはどうだ。 JOIN が掛け算だということは、知っていた。だが1対多のとき行数がどう変わるか、なぜそうなるかを説明できなかった。「なんとなく動く」クエリを書き続けていた。 本記事は『達人に学ぶSQL徹底指南書』の外部結合の章を読んで得た気づきをまとめたものだ。1対多の結合で何が起きているかが腹に落ちてから、クエリの書き方が変わった。 その視点を手に入れろ。 外部結合とは何か まず基本の確認から。 INNER J…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fchamotaro.hatenablog.com%2Fentry%2Ftech%2Fjoin-kakuzan&quot; title=&quot;結合は掛け算だ。1対多の先まで掴め。 - chamotaroooのブログ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2026-10-25 10:08:39</published>
  <title>結合は掛け算だ。1対多の先まで掴め。</title>
  <type>rich</type>
  <url>https://chamotaro.hatenablog.com/entry/tech/join-kakuzan</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
