Joins In SQL
Whenever we want to fetch data from two or more database tables based on
common field (column) we use Joins.
Apart from types of join we also have two join conditions these are
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
You can DOWNLOAD SQL script and presentation used in the Video and in this article.