Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 709951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T04:33:38+00:00 2026-05-14T04:33:38+00:00

What are the uses of the different join operations in SQL? Like I want

  • 0

What are the uses of the different join operations in SQL? Like I want to know why do we need the different inner and outer joins?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T04:33:39+00:00Added an answer on May 14, 2026 at 4:33 am

    The only type of join you really need is LEFT OUTER JOIN. Every other type of join can be rewritten in terms of one or more left outer joins, and possibly some filtering. So why do we need all the others? Is it just to confuse people? Wouldn’t it be simpler if there were only one type of join?

    You could also ask: Why have both a <= b and b >= a? Don’t these just do the same thing? Can’t we just get rid of one of them? It would simplify things!

    Sometimes it’s easier to swap <= to >= instead of swapping the arguments round. Similarly, a left join and a right join are the same thing just with the operands swapped. But again it’s practical to have both options instead of requiring people to write their queries in a specific order.

    Another thing you could ask is: In logic why do we have AND, OR, NOT, XOR, NAND, NOR, etc? All these can be rewritten in terms of NANDs! Why not just have NAND? Well it’s awkward to write an OR in terms of NANDs, and it’s not as obvious what the intention is – if you write OR, people know immediately what you mean. If you write a bunch of NANDs, it is not obvious what you are trying to achieve.

    Similarly, if you want to do a FULL OUTER JOIN b you could make a left join and a right join, remove duplicated results, and then union all. But that’s a pain and so there’s a shorthand for it.

    When do you use each one? Here’s a simplified rule:

    • If you always want a result row for each row in the LEFT table, use a LEFT OUTER JOIN.
    • If you always want a result row for each row in the RIGHT table, use a RIGHT OUTER JOIN.
    • If you always want a result row for each row in either table, use a FULL OUTER JOIN.
    • If you only want a result row when there’s a row in both tables, use an INNER JOIN.
    • If you want all possible pairs of rows, one row from each table, use a CROSS JOIN.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to make a ComboBox that uses different colors for different items. I
I was wondering what technologies are needed to develop and app that uses different
my project uses 2 different C++ compilers, g++ and nvcc (cuda compiler). I have
I have a Django form that uses a different number of fields based on
I have multiple classes that will store similar data for different uses and I
Here's my previous question about switching C callstacks. However, C++ uses a different calling
I have 3 different jquery uses & put it into one code as follows:
I have some data which (quite reasonably) uses null and false for different meanings.
I have a project which uses php's mt_rand() to generate different random integers but
I have to write a solution that uses different databases with different structure from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.