JOINs in DB2, need help.

RDBMS from IBM and IBM's Hierarchical DBMS and Transaction Manager (IMS DC).
Post Reply
Manju Mainframe
Registered Member
Posts: 24
Joined: Mon Aug 12, 2013 10:50 am

JOINs in DB2, need help.

Post by Manju Mainframe »

Hi,

The concepts of joins are very confusing for me. I really do not undertand the difference between Inner Join and Outer Joins. I have been looking for some good example on inner join, left outer join, and right outer join but could not find something for mainframes.

Could someone provide me examples of the same? And if possible explain it.
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: JOINs in DB2, need help.

Post by nicc »

It is out there on the internet because I have seen it in one of the many tutorials but which one I cannot remember. I think you need one with a Venn diagram to explain it better.
Regards
Nic
zprogrammer
Global Moderator
Global Moderator
Posts: 588
Joined: Wed Nov 20, 2013 11:53 am
Location: Mars

Re: JOINs in DB2, need help.

Post by zprogrammer »

Check the below diagram , I have tried to explain join in very quick way hope this is clear
JOINS.jpg
You do not have the required permissions to view the files attached to this post.
zprogrammer
Manju Mainframe
Registered Member
Posts: 24
Joined: Mon Aug 12, 2013 10:50 am

Re: JOINs in DB2, need help.

Post by Manju Mainframe »

Pandora-Box wrote:Check the below diagram , I have tried to explain join in very quick way hope this is clear
JOINS.jpg
Thanks a lot for the diagram Pandora-Box.
Chandan Yadav
Website Team
Website Team
Posts: 70
Joined: Wed Jul 31, 2013 10:19 pm

Re: JOINs in DB2, need help.

Post by Chandan Yadav »

Try out some examples execution in Spufi or QMF you will get better understanding
Manju Mainframe
Registered Member
Posts: 24
Joined: Mon Aug 12, 2013 10:50 am

Re: JOINs in DB2, need help.

Post by Manju Mainframe »

Thanks Chandan. But I am not allowed to create some test data to test these things. With out test tables how can I do it?
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 826
Joined: Wed Sep 11, 2013 3:57 pm

Re: JOINs in DB2, need help.

Post by enrico-sorichetti »

if You are a developer of You should have access to a DB2 instance

think about the tables You have access and if they share some columns You can try the joins on them
and remember to limit the result set 
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
Chandan Yadav
Website Team
Website Team
Posts: 70
Joined: Wed Jul 31, 2013 10:19 pm

Re: JOINs in DB2, need help.

Post by Chandan Yadav »

You can have Db2 instance on local machine check for Db2 Express edition n test it out. Joins works same if you doing it on local machine or on mainframes.

As Enrico said if you are a developer you should have access
Manju Mainframe
Registered Member
Posts: 24
Joined: Mon Aug 12, 2013 10:50 am

Re: JOINs in DB2, need help.

Post by Manju Mainframe »

I'm in to support project for some time where SPUFI and QMF use is restricted.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1891
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: JOINs in DB2, need help.

Post by Robert Sample »

I'm in to support project for some time where SPUFI and QMF use is restricted.
Why not download and install the free DB2 system for Windows onto your personal machine?
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: JOINs in DB2, need help.

Post by nicc »

Or even download any old RDBMS that uses SQL and experiment with that. For the record I use SQLite and it gets me through all I need to know with standard SQL queries.
Regards
Nic
Manju Mainframe
Registered Member
Posts: 24
Joined: Mon Aug 12, 2013 10:50 am

Re: JOINs in DB2, need help.

Post by Manju Mainframe »

Why not download and install the free DB2 system for Windows onto your personal machine?
Or even download any old RDBMS that uses SQL and experiment with that. For the record I use SQLite and it gets me through all I need to know with standard SQL queries.
Thanks for the suggestion I did not think about these. Will try them. Thanks !
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “IBM DB2 and IMS DB/DC”