What is join? How many types of joins?

 Posted by Rajni.Shekhar on 4/3/2012 | Category: Sql Server Interview questions | Views: 3805 | Points: 40
Answer:

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.

INNER 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.

SELF JOIN: 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 | Alert Moderator 

Comments or Responses

Login to post response