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.

So the concept of RDBMS depends on relationship.

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

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

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.