• Valmond@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    4 hours ago

    LEFT JOIN

    Includes empty entries, doubles others.

    It sure is long due for an overhaul.

        • expr@programming.dev
          link
          fedilink
          arrow-up
          1
          ·
          26 minutes ago

          It doesn’t arbitrarily double rows or something. For each row in the relation on the left of the join, it will produce 1 or more rows depending on how many rows in the relation on the right of the join match the join condition. The output relation of the join may have duplicate rows depending on the contents of each joined relation as well as what columns you are projecting from each.

          If you want to remove duplicates, that’s what DISTINCT is for.

          • Valmond@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            edit-2
            14 minutes ago

            Thanks, I will kot forget that the next time I have to do SQL!

            Still wild there are no simpler language that have grown in popilarity for databases though.