6
Reply

Can u explain Joins in SQL with examples?

Poonam Jain

Poonam Jain

Apr 18, 2009
10.9k
0

    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

    Gangadhar
    August 19, 2009
    0

    Basically,there are two types of join
     but further these are divided in to parts as fellow
    1. Inner Join

    1. Equi Join
    2. Natural join
    3. Cross Join
    2. Outer join
    1. Left outer
    2. Right outer
    3. full outer Join
    Thanks & Regards,
    Amin Anwar
    [email protected]

    Amin Anwar
    April 22, 2009
    0

    Basically,there are two types of join
    1. Inner Join

    2. Outer join

    Amin Anwar
    April 22, 2009
    0

    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 tables
    Ex :
    select empname,empid from emp table inner join on dept table where emptable.empid = depttable.deptid
    2) Outer join:
    It will retrive only matched records from both the tables .it is again classified into two types
    a)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.deptid
    b)Right outer: Reverse of Left join
    3)Cross join: cross join is used for the cross the two table data.
    4) self join:joining it self .
      

    P Narasimha
    April 21, 2009
    0

    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]

       

       

    sanjeev singh
    April 21, 2009
    0