---
title: "Joins and Their Types in DB2 SQL"
description: "Joins is a one of the key concept in SQL. In an RDBMS we have tables with one-one, one-many and many-many relationships. https://srinimf.com/2015/03/26/db2-joins-interview-questions/. So the concept o..."
url: https://srinimf.com/2012/07/10/sql-db2-and-joins/
date: 2012-07-10
modified: 2026-10-10
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2012/07/pexels-photo-4144144.jpeg?fit=1880%2C1255&ssl=1
categories: ["Data Warehousing & Tools"]
tags: ["SQL Join Types"]
type: post
lang: en
---

# Joins and Their Types in DB2 SQL

Joins is a one of the key concept in SQL. In an RDBMS we have tables with one-one, one-many and many-many relationships.

Related[5 SQL JOINS Useful for DB2 projects](https://srinimf.com/2015/03/26/db2-joins-interview-questions/)

So the concept of RDBMS depends on relationship.

Related[Two SQL queries on Self-join and Inner-Join](https://srinimf.com/2016/09/08/2-simple-sql-queries-on-self-join-and-inner-join/)

## Why do you need Joins

In a Realtime environment, database architect will design relation between various tables. User needs collective data from all the related tables.

Joins are much useful.

- FULL OUTER JOIN
- LEFT OUTER JOIN
- [RIGHT OUTER JOIN](https://srinimf.com/2018/06/09/real-idea-left-outer-join-you-always-need-to-code-in-db2-read-now/)

FOJ: It retrieves rows from all the tables

LOJ: It retrieves all rows from left table and also matching rows of the two tables

ROJ: It retrieves all rows from right table and also matching rows of the two tables

Note: OUTER is Optional word

In my next post I will add some examples on this.

Related

- [Left Vs Right Outer Join Which is Better](https://srinimf.com/2018/06/09/real-idea-left-outer-join-you-always-need-to-code-in-db2-read-now/)DateJune 9, 2018
- [SQL JOINs 12 Common Interview Questions Explained](https://srinimf.com/2023/10/21/12-top-sql-joins-interview-questions/)DateOctober 21, 2023
- [How to JOIN Tables in DB2: SQL Query](https://srinimf.com/2023/07/24/how-to-retrieve-two-tables-data-using-db2-join/)DateJuly 24, 2023

### Share this:

-
- [Tweet](https://twitter.com/share)
- [![](https://i0.wp.com/assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png)](https://www.pinterest.com/pin/create/link/?url=https%3A%2F%2Fsrinimf.com%2F2012%2F07%2F10%2Fsql-db2-and-joins%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2012%2F07%2Fpexels-photo-4144144.jpeg%3Ffit%3D1200%252C801%26ssl%3D1&description=Joins%20and%20Their%20Types%20in%20DB2%20SQL)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2012/07/10/sql-db2-and-joins/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2012/07/10/sql-db2-and-joins/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2012/07/10/sql-db2-and-joins/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2012/07/10/sql-db2-and-joins/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20Joins%20and%20Their%20Types%20in%20DB2%20SQL&body=https%3A%2F%2Fsrinimf.com%2F2012%2F07%2F10%2Fsql-db2-and-joins%2F&share=email)
-

### Like this:

Like Loading…
