Joins in SQL.

By Manish Sharma

Introduction of Joins In SQL.

Joins In SQL

Whenever we want to fetch data from two or more database tables based on common field (column) we use Joins.

  Technically Joins are SQL operations which help us in retrieving data from two or more tables that share a common

Types of Joins

There several Types of Joins such as
  1. Inner Join
  2. Outer Join
  3. Cross Join
  4. Self-Join
Outer Join can further be categorize into 3 more categories

  1. Right Outer Join
  2. Left Outer Join
  3. Full Outer Join.
sql joins rebellionrider

Apart from types of join we also have two join conditions these are

  1. Equi Joins
  2. Non-Equi Joins

Equi Join: this type of Join looks for common records in two tables on the basis of equality condition and then combines them. Equi-Join is constructed with the help of equality operator (=) where the values of Primary key and Foreign key are compared. Hence the common or matching records from the two tables are presented in the result.

Non Equi Join: Here equality operator is not used, instead operators such as <, >, BETWEEN etc. are employed. Therefore Non Equi-Join is the opposite of Equi-Join, and uses joining conditions excluding equal operator. For example, in a non Equi-Join condition you can use !=, <=,>=,<,> or BETWEEN etc. operators can be used for joining. For implementation you can see Inner-Join.

Outer Join: Outer joins are the SQL operation which definitely return all the rows from Source table no matter whether there is a matching join condition hit or not. At the same time it returns only those rows of the target table that fulfils the matching join condition otherwise just shows ‘null’ in the rows

SQL Script and Presentation used

You can DOWNLOAD SQL script and presentation used in the Video and in this article.

NO SQL Script used in Video and in this article
Presentation used in Video and in this article

Do Not Drink & Drive Use My Uber Code "UberRebellionRider"
SignUp using my referral code and get first ride worth $20 FREE

  • Manish Sharma Oracle Rebellion Rider
  • Manish Sharma Oracle certified SQL expert
  • Manish Sharma oracle certified associate
  • Manish Sharma oracle certified professional
  • View Manish Sharma's profile on LinkedIn
  •          View Manish Sharma's profile on LinkedIn