SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Joins question
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Rasta Pickles
Posting Yak Master

United Kingdom
148 Posts

Posted - 05/25/2012 :  15:06:13  Show Profile  Reply with Quote
Are they in any way beneficial?

I've inherited a query that has a "full outer join" part......I replaced it with "inner join" and the output was identical.

What's wrong with something along the lines of

"where customer.custno = custdel.custno and orders.custid = custdel.custno"?

tkizer
Almighty SQL Goddess

USA
35017 Posts

Posted - 05/25/2012 :  15:18:58  Show Profile  Visit tkizer's Homepage  Reply with Quote
The output is identical because all of the join conditions match up in the tables. Outer joins are needed when you need the data in a particular table even if it doesn't match data in the other table.

So while it may be identical right now, it may not be in the future. Whether or not the outer join is needed is dependent upon the business requirement. It's not something we can answer for you.

And that syntax should be avoided, use JOIN syntax only for standard and support reasons.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

Edited by - tkizer on 05/25/2012 15:19:36
Go to Top of Page
  Previous Topic Topic Next Topic  
 New 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.09 seconds. Powered By: Snitz Forums 2000