Joins are used to extract data from multiples tables on specified some conditions.
Joins are INNER JOIN, LEFT OUTER JOIN, RIGHT OUTER JOIN, SELF JOIN.
extract only matched data from two tables.
LEFT OUTER JOIN:
extract all data from left table and matched data from right table, having null against unmatched records.
RIGHT OUTER JOIN:
extract all data from right table and matched data from left table, having null against unmatched records.
exctract data from one table by creating two alias of a table on specified some condition.
Even there are more joins like cross join, non-equi joins but they are in less use.
For beginners link: http://www.w3schools.com/sql/sql_join.asp
Asked In: Many Interviews |