Results 1 to 4 of 4

Thread: Equi Join vs Natural Join in SQL

  1. #1
    Join Date
    Feb 2009
    Posts
    123

    Equi Join vs Natural Join in SQL

    There is something called Equi Join in SQL. Is it different from the Join operation we normally perform in SQL ? I want to know what is the difference between equi join and the natural join? Which join option is better ?
    Can anyone help me with this......thanks

  2. #2
    Join Date
    Feb 2008
    Posts
    1,852

    Re: Equi Join vs Natural Join in SQL

    In SQL, there are following categories for Join operations -

    • Inner Joins
    • Outer Joins
    • Subtract Joins
    • Full Outer Joins
    • Self Joins
    • Equi-Joins
    • Natural Joins
    • Cartesian Products


    For detailed information on each of the above join operations,
    visit the following microsoft site - http://support.microsoft.com/kb/136699

  3. #3
    Join Date
    May 2008
    Posts
    2,389

    Re: Equi Join vs Natural Join in SQL

    For Equi join, you need to specify columns which you want to put equi join
    For Example :
    SQL> select dpt.dptno from dept join emp on emp.dptno=dpt.dptno;

    whereas

    For natural join, you dont need to specify column names for the join – it will automatically join same name columns in two different tables
    For Example :
    SQL> select dptno from dept natural join emp;

  4. #4
    Join Date
    Jan 2008
    Posts
    1,521

    Re: Equi Join vs Natural Join in SQL

    SQL Joins acan be classified into - EQUI Join and NON-EQUI Join

    EQUI Join -
    It is a sql join condition which uses the equal sign as the comparison operator. An equi-join is further classified into two categories:
    a) SQL Inner Join
    b) SQL Outer Join

    In SQL Inner Join, all the rows returned by the sql query satisfy the sql join condition specified.

    In SQL Outer Join, it returns all rows from both tables which satisfy the join condition along with rows which do not satisfy the join condition from one of the tables.

    NON-EQUI Join -
    A Non Equi Join is a SQL Join whose condition is established using all comparison operators except the equal (=) operator. (>=, <=, <, >).

Similar Threads

  1. Replies: 3
    Last Post: 02-06-2012, 12:44 PM
  2. How to re-join all partitions on HDD
    By tester22 in forum Operating Systems
    Replies: 2
    Last Post: 08-10-2009, 11:23 PM
  3. Too many rows after Join in SQL
    By Elkanah in forum Software Development
    Replies: 2
    Last Post: 24-03-2009, 02:11 PM
  4. Join in SQL
    By Ettan in forum Software Development
    Replies: 1
    Last Post: 10-11-2008, 01:45 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,670,013,210.50069 seconds with 17 queries