IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

joins four types..can we use all in DB2


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kumar119119

New User


Joined: 31 May 2010
Posts: 25
Location: Pune

PostPosted: Mon Jun 28, 2010 11:18 pm
Reply with quote

Hi Folks,
Good Evening to All,

in DB2 joins are

inner join
left outer join
right outer join
full outer join

my question is

can we use/can all these used in DB2,
if used at which scenario,,not definition of four joins?

From
Satish kumar reddy.T
Bangalore.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Tue Jun 29, 2010 1:19 pm
Reply with quote

I know I can .
Right Join can also be written as left join. So there is no need ever to use Right join.

when Inner, when Left, when Full outer ? It depends on the business requirement.
"Give me all entity1 with their entity2's" is a typical inner join.
"Give me all entity1 and if they have entity2's give those too" is a typical left join.
"list me all entity1 and entity2 with the differences" is a typical full outer join
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Jun 29, 2010 2:07 pm
Reply with quote

Well phrased, Guy
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Types of variables REXX TSO/ISPF 2
No new posts Need help in Joins JCL & VSAM 9
No new posts Personal Comm. - User Defined Transfe... IBM Tools 6
No new posts File Manager reading file with differ... IBM Tools 1
No new posts Component Types In Endevor CA Products 1
Search our Forums:

Back to Top