File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

inner join Vs outer join

 
kri shan
Ranch Hand
Posts: 1453
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the difference between inner join and outer join ?
 
James Swan
Ranch Hand
Posts: 403
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
- inner joins only returns rows that "match" in both tables
- outer joins return "all" rows from 1st table, and null valued columns in rows that don't exist in the 2nd table

for example, imagine we have this data, also for each query, we join them on column "id":


Also to note, the SQL syntax for outer joins is database vendor specific, Oracle used different notation from say SQL Server.
 
kri shan
Ranch Hand
Posts: 1453
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Oracle outer join is defined as * symbol. in Sybase outer join is defined as + symbol. What is the outer join symbol for DB2 ?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33694
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kri,

 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic