Tuesday, March 27, 2012

Difference between left outer join and right outer join

Hello,

What is the difference between left outer join and right outer join. Which one is better.

I know the basic difference wherein for left outer join all rows of table in left are selected and compared whereas in case of right outer join all rows of table in right are selected and compared.

But besides that what difference it has I am not aware of it. Also I am not sure which one is better over the other.

Thank You

Jatin

There's no other difference. You just use one or the other depending on what order the tables are mentioned in the query and which one you want to be the "primary" table.|||If you reverse the order of the two tables, you can use a LEFT JOIN or a RIGHT JOIN, and the results should be the same, the execution should be the same, and the perfomance should be the same.

No comments:

Post a Comment