Results 1 to 6 of 6

Thread: Types of Joins in SQL

  1. #1
    Junior Member
    Join Date
    Nov 2007
    Answers
    1

    Types of Joins in SQL

    Hi pls can any one tel me and explain types of Joins in SQL??


  2. #2
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074

    Re: Types of Joins in SQL

    Please find the details here.


  3. #3
    Junior Member
    Join Date
    Jun 2006
    Answers
    2

    Re: Types of Joins in SQL

    Hello, Thank U...........


  4. #4
    Junior Member
    Join Date
    Jul 2008
    Answers
    1

    Re: Types of Joins in SQL

    1. Inner join 2. Outer join 3. Cross join 1. Inner join: inner join is the default type of join, it will producesses the result set, which contains matched rows only. Syntax: select * from table1table2 2. Outer join: outer join produces the results, which contains matched rows and unmatched rows. Here we have three types of joins, 1.left outer join 2.right outer join 3.full outer join left outer join: left outer join producesses the results, which contains all the rows from left table and matched rows from right table. Syntax: select * from table1table2 right outer join: right outer join producesses the resultset, which contains all the rows from right table and matched rows from left table. Syntax:select * from table1table2 full outer join: full outer join producesses the resultset, which contains all the rows from left table and all the rows from right table. Syntax:select * from table1table2 3.cross join: a join without having any condition is known as cross join, in cross join every row in first table is joins with every row in second table. Syntax: select * from table1table2 self join: a join joins withitself is called self join working with self joins we use alias tables.


  5. #5
    Junior Member
    Join Date
    Jul 2008
    Answers
    6

    Re: Types of Joins in SQL

    We have three types of Joins in sql.
    They are
    1. Inner join
    2. Outer join
    3. Cross join

    1. Inner join:
    Inner join is the default type of join, it will producesses the result set, which contains matched rows only.

    Syntax: select * from table1table2
    Here noneed of specifying innerjoin. Simply we can specify Join also.

    Syntax: select * from table1table2

    2. Outer join:
    Outer join produces the results, which contains matched rows and unmatched rows.

    Outer join is further classified as three types.They are
    1.left outer join
    2.right outer join
    3.full outer join.

    a.Left outer join:
    Left outer join producesses the results, which contains all the rows from left table and matched rows from right table.

    Syntax: select * from table1table2

    b.Right outer join:
    Right outer join producesses the resultset, which contains all the rows from right table and matched rows from left table.

    Syntax:select * from table1table2

    c.Full outer join:
    Full outer join producesses the resultset, which contains all the rows from left table and all the rows from right table.

    Syntax:select * from table1table2

    3.Cross join:
    A join without having any condition is known as cross join, in cross join every row in first table is joins with every row in second table. Cross join is nothing but cortizion product.

    Syntax: select * from table1table2

    Self join:
    A join joins withitself is called self join working with self joins we use alias tables.


  6. #6
    Junior Member
    Join Date
    Jul 2008
    Answers
    6

    Re: Types of Joins in SQL

    We have three types of Joins in sql.
    They are
    1. Inner join
    2. Outer join
    3. Cross join

    1. Inner join:
    Inner join is the default type of join, it will producesses the result set, which contains matched rows only.

    Syntax: select * from table1 table2 where
    Here noneed of specifying innerjoin. Simply we can specify Join also.

    Syntax: select * from table1 table2 where

    2. Outer join:
    Outer join produces the results, which contains matched rows and unmatched rows.

    Outer join is further classified as three types.They are
    1.left outer join
    2.right outer join
    3.full outer join.

    a.Left outer join:
    Left outer join producesses the results, which contains all the rows from left table and matched rows from right table.

    Syntax: select * from table1 table2 where

    b.Right outer join:
    Right outer join producesses the resultset, which contains all the rows from right table and matched rows from left table.

    Syntax:select * from table1 table2 where

    c.Full outer join:
    Full outer join producesses the resultset, which contains all the rows from left table and all the rows from right table.

    Syntax:select * from table1 table2 where

    3.Cross join:
    A join without having any condition is known as cross join, in cross join every row in first table is joins with every row in second table. Cross join is nothing but cortizion product.

    Syntax: select * from table1table2

    Self join:
    A join joins withitself is called self join working with self joins we use alias tables.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact