Answered by: krishna420
Member Since Jul-2008 | Answered On : Jul 23rd, 2008
There are 5 types of joins available in sql server
1) inner join
2) outer join( left outer join,Right outer join)
3) Full Join
4) Cross Join
5) Self Join
1) inner Join : Two tables having the common column values go with inner join.
select * from emp inner join empsalary
2) outer join:
Outer join has two sub types left outer join,Right outer join
Left outer join: Taking Left side values of the table checking into right side
select * from emp left outer join empsalary
Right Outer join:Taking Right side values of the table checking left side
select * from emp right outer join empsalary
3) Full join :
Full join is combined with left outer join ,Right outer join.
select * from emp full join employee
4) cross Join: cross join is an carteasion product ,its like matrix format here it wont come on condidtion
select * from emp cross join employee
Self join :
Self join can check within the table called self join.