What is a join?
Before starting discuss on joins, first we should know what is join?
SQL Server is a RDBMS(Relation database management system), i.e. it has tables which holds rows and columns and relationship between multiple tables using keys. So when we have to get data from more than one table, we use joins to get it. Join in sql is used to combine rows from two or more table based on comparing one or more common fields.
Types of Joins in SQL
INNER JOIN:- Returns all rows when at least one match in both tables.
LEFT JOIN:- Returns all rows from left table and matched rows from right table.
RIGHT JOIN : – Returns all rows from right table and matched rows from left table.
FULL JOIN :- Returns all rows from both tables.… More