Can u explain Joins in SQL with examples?
Poonam Jain
Joins are use for retrieve data from multiple tables. It can contain one to one ,one to many,,many to one ,many to many relationship b/w tables. Joins are mainly 4 types 1. inner join 2. Outer join 3. Self join 4. Cross join
See excellent artical from this link.
http://blog.sqlauthority.com/2009/04/13/sql-server-introduction-to-joins-basic-of-joins/
Basically,there are two types of join but further these are divided in to parts as fellow1. Inner Join
Basically,there are two types of join 1. Inner Join2. Outer join
Hi,
Join: Join is nothing but retrieve the data from multiple table .Joines are classified into 4 types.1) Inner join.2)Outer join.3)Cross join.4)Self join.1) Inner join: Inner join is used for select matched rows as well as unmatched rows from both the tablesEx :select empname,empid from emp table inner join on dept table where emptable.empid = depttable.deptid2) Outer join:It will retrive only matched records from both the tables .it is again classified into two typesa)Left outer:Left side table select all record and right side table select only matched records.Ex:select empname,empid from emp table Left join on dept table where emptable.empid = depttable.deptidb)Right outer: Reverse of Left join3)Cross join: cross join is used for the cross the two table data.4) self join:joining it self .
Hi Poonam Jee.
Joins retrieve data more than one tables on the basis of conditions.
Types of Joins:-
1) Inner Joins.
2) Outer Joins.
3) Self Joins.
4) Cross Joins.
5) Equi Joins.
etc.
Note:-Join implicitly means Inner Join
Outer Join must be supplied with either of left, right or full Join
Sanjeev Kumar singh
Thanks.
EmailId:- [email protected]