Home » SQL & PL/SQL » SQL & PL/SQL » Equi Join and Inner Join
Equi Join and Inner Join [message #133830] Mon, 22 August 2005 06:30 Go to next message
nirmalnarayan
Messages: 261
Registered: April 2005
Location: India
Senior Member
Hi all,

What are the main differences between an Equi Join and an Inner Join ?

Thanks and Regards,

Nirmal N.
Re: Equi Join and Inner Join [message #133834 is a reply to message #133830] Mon, 22 August 2005 06:41 Go to previous messageGo to next message
kiran
Messages: 503
Registered: July 2000
Senior Member
Equi join is the join which contains an equal operator in its join condition.

where as Inner join is a join which returns rows from two or more tables which satisfies the join condition.

more options are here.

--Kiran.
Re: Equi Join and Inner Join [message #133843 is a reply to message #133834] Mon, 22 August 2005 07:05 Go to previous messageGo to next message
dmitry.nikiforov
Messages: 723
Registered: March 2005
Senior Member
Inner join is a subtype of Equijoin.

Equijoin means the join betreen tables where the values of
two or more columns are equal:

SQL> /* Inner join as equijoin */
SQL> select dept.deptno from dept join emp on emp.deptno = dept.deptno;

    DEPTNO
----------
        20
        30
        30
        20
        30
        30
        10
        20
        10
        30
        20
        30
        20
        10

14 rows selected.

SQL> /* Natural join as equijoin */
SQL> select deptno from dept natural join emp;

    DEPTNO
----------
        20
        30
        30
        20
        30
        30
        10
        20
        10
        30
        20
        30
        20
        10

14 rows selected.

Rgds.
Re: Equi Join and Inner Join [message #134167 is a reply to message #133830] Tue, 23 August 2005 14:10 Go to previous messageGo to next message
mchadder
Messages: 224
Registered: May 2005
Location: UK
Senior Member
For a good discussion on the 9i ANSI JOIN syntax, see here.

Rgds
Re: Equi Join and Inner Join [message #134223 is a reply to message #133843] Tue, 23 August 2005 23:12 Go to previous messageGo to next message
nirmalnarayan
Messages: 261
Registered: April 2005
Location: India
Senior Member
HI,

Thanks all. So, there will be nothing wrong in saying , that 'Equi join' and 'Inner Join' are different terminologies applied to same functionality, right ?

Thanks and Regards,

Nirmal
Re: Equi Join and Inner Join [message #134361 is a reply to message #133830] Wed, 24 August 2005 08:31 Go to previous messageGo to next message
smartin
Messages: 1803
Registered: March 2005
Location: Jacksonville, Florida
Senior Member
No, I would view that as being incorrect.

[Updated on: Wed, 24 August 2005 08:32]

Report message to a moderator

Re: Equi Join and Inner Join [message #134367 is a reply to message #133830] Wed, 24 August 2005 09:19 Go to previous messageGo to next message
mchadder
Messages: 224
Registered: May 2005
Location: UK
Senior Member
Hello.

Yeah, I would consider that incorrect too. An INNER JOIN is *some kind* of join between the two sets, whether equality or inequality, whereas an equi join is always equality, i.e.
here's an example of an INNER JOIN being a "non-equi join", whereas a NATURAL JOIN (etc. etc.) has to be an equi-join :
SQL> SELECT * 
  2    FROM dual 
  3         INNER JOIN dual d2 ON ( d2.dummy != dual.dummy );

no rows selected

SQL> SELECT * 
  2    FROM dual NATURAL JOIN dual d2;

D
-
X

Rgds
Re: Equi Join and Inner Join [message #134428 is a reply to message #134367] Wed, 24 August 2005 22:36 Go to previous messageGo to next message
nirmalnarayan
Messages: 261
Registered: April 2005
Location: India
Senior Member
Thanks a lot mchadder.

Rgds
Nirmal
Re: Equi Join and Inner Join [message #550944 is a reply to message #134428] Fri, 13 April 2012 13:53 Go to previous messageGo to next message
thiyagusham
Messages: 112
Registered: April 2012
Location: Chennai
Senior Member
@ hi to everyone

Simple join is called Inner join

It has two types

a) Equi join
b) Non equi join

An equijoin is a join with a join condition containing
an equality operator. equijoin combines rows that
have equivalent values for the specified column

For ex e.empid=d.empid;

empid is common for employee table and department table.
I think inner join it wont do any specific action.
actually it checks equality operator.
------------

Thanks
Thiyagusham .G
Re: Equi Join and Inner Join [message #550945 is a reply to message #550944] Fri, 13 April 2012 14:07 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Please continue to occupy yourself with resurrecting zombie posts that have been buried & dormant more than 6 years
Re: Equi Join and Inner Join [message #550949 is a reply to message #550945] Fri, 13 April 2012 14:44 Go to previous message
thiyagusham
Messages: 112
Registered: April 2012
Location: Chennai
Senior Member
Hello to every one !

" No more difference between simple join and Inner join "

Simple joins some times called INNER JOIN.

Recently I saw this post. I visited some other blogs regarding inner joins and simple joins..

Inner join classified as
EQUI JOIN
NON Equi JOIN

'equi-join' means joining tables using the equality operator or equivalent.
I would still call an outer join an 'equi-join' if it only uses equality (others may disagree)

'NON Equi Join' always condition relates two tables by an operator other than equality

SQL>select   a.name,  a.empid,  a.empid,  from x  a,   y  b  
where  a.empid=b.empid ; 

NAME	EMAIL	        EMPID
Sam	sam@orcl.com    1060 
Rose	rose@orcl.com   1061  
Chris	chris@sap.com   1062 



If any clarification please post valuable comments with clear
Explanation.

Thanks and Regards
Thiyagusham .G


Previous Topic: How to check open http connections in the database
Next Topic: complex program of breaking summary into details and some vessel thingy (merged 4+2)
Goto Forum:
  


Current Time: Fri Apr 26 08:54:15 CDT 2024