Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2011
    Posts
    2

    Unanswered: Difference in each join

    Hi all,
    i want to know the difference of each join in sql server.please clarify me.
    thanks,
    rani

  2. #2
    Join Date
    Mar 2007
    Location
    Holmestrand, Norway
    Posts
    332
    Inner Join
    Outer Join
    Cross Join
    Self Join

    The latter is strictly speaking not a specific type of join.
    Ole Kristian Velstadbråten Bangås - Virinco - MSSQL.no - Facebook - Twitter

  3. #3
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    suppose you have these two tables --
    Code:
     A     B
    102   101
    104   102
    106   104
    107   106
    here are what you'd get for the various joins --
    Code:
    A inner join B
    102   102
    104   104
    106   106
    Code:
    A left outer join B
    102   102
    104   104
    106   106
    107   null
    Code:
    A right outer join B
    null  101
    102   102
    104   104
    106   106
    Code:
    A full outer join B
    null  101
    102   102
    104   104
    106   106
    107   null
    Code:
    A cross join B
    102   101
    104   101
    106   101
    107   101
    102   102
    104   102
    106   102
    107   102
    102   104
    104   104
    106   104
    107   104
    102   106
    104   106
    106   106
    107   106
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  4. #4
    Join Date
    Jul 2011
    Posts
    78
    That's a very nice clarification. Makes it a lot more clear than explanations in words.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •