In this topic, you will learn about, What is joins. Discuss the different types of Joins.
Joins: A SQL join clause combines records from two or more tables based on a common field in a relational database. It creates a set that can be saved as a table or used as it is. A JOIN is a means for combining fields from two tables or more by using values common to each. ANSI-standard SQL specifies five types of JOIN: INNER, EQUI, OUTER & CROSS joins.
Types of join:
- Inner Join: The join that displays only the rows that have a match in both the joined tables is known as an inner join.
- Equi-Join: Equi join is a special type of join in which we use only the equality (=) operator.
- Outer Join: Outer join returns all the rows of both tables whether it has matched or not. We have three types of outer join: 1. Left outer join
2. Right outer join
3. Full outer join - Cross Join: A cross join is that produces a Cartesian product of the tables.
Comment below if you have queries related to the above topic, What is joins? Discuss the different types of Joins.