Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Why Right join
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

3 Posts

Posted - 10/31/2012 :  06:22:59  Show Profile  Reply with Quote
hi to all,

Why we have to use right join, we can swipe the tables and we can use lift join any one please help me on this.

Flowing Fount of Yak Knowledge

5155 Posts

Posted - 10/31/2012 :  07:02:31  Show Profile  Reply with Quote
Conceptually you are right - one should be able to swap the tables and make a left join into a right join. It exists for your convenience if you want to use it. Also, even though you may write a query using LEFT join, the query optimizer may make it into a RIGHT join (which would be transparent to you, of course).

Some interesting comments here:
Go to Top of Page

Transact Charlie
Flowing Fount of Yak Knowledge

United Kingdom
3451 Posts

Posted - 10/31/2012 :  12:20:31  Show Profile  Visit Transact Charlie's Homepage  Reply with Quote
I wonder if RIGHT JOIN is more prevalent in Asian cultures where the reading is right to left?

Transact Charlie
Msg 3903.. The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION.
Go to Top of Page

Flowing Fount of Yak Knowledge

4614 Posts

Posted - 10/31/2012 :  17:04:13  Show Profile  Reply with Quote
I admit I don't use it much any more. However, using a right join was more prevalent on older versions of SQL becuase the optimizer used to join tables from right to left. So, you could "help" it out by joining the smaller tables first.
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000