Joins in sqlserver
Types of Joins in Sqlserver
There are 3 Types of Joins used in sqlserver:
1.Inner Join
1.1 Equi join
1.2 Non Equi join
1.3 Self
2.Outer Join
2.1.Left Outer
2.2.Right Outer
2.3.Full Outer
3.Cross Join
Inner Join:
----------
This join returns rows when there is atleast one match in both the tables.
example: select * from table1 t1 INNERJOIN table2 t2 ON t1.col1=t2.col1
Outer Join:
-----------
It includes 3 different Joins
1.LeftOuterJoin:
This join retruns all the rows from the left table in conjuction with the matching rows from the right table. If there are are no columns matching in the right table, it returns NULL values.
example: select * from table1 t1 LEFTOUTERJOIN table2 t2 ON t1.col1=t2.col1
2.RightOuterJoin :
This join retruns all the rows from the right table in conjuction with the matching rows from the left table. If there are are no columns matching in the left table, it returns NULL values.
example: select * from table1 t1 RIGHTOUTERJOIN table2 t2 ON t1.col1=t2.col1
FullOuterJoin:
This join combines left outer join and right outer join. It returns rows from either table when the condtions are met and returns null value when there is no match.
Thanks & Regards
Narayana
you can join information get please check below link
http://bharat1990.wordpress.com/2013/04/25/types-of-join-in-sql-server/