What is the differecne between equi-join and inner-join and
natural join..Is there any difference or all are same?

Answer Posted / sobia g.

An inner join is a join with a join condition that may contain both equality or non-equality sign whereas an equijoin is a join with a join condition that only contain only equality sign.
So we can say an equijoin is a type of inner join containing (Equal)= operator in the join condition.

It is good to know the difference between join and INNER JOIN keywoed. Actually there is no difference. If we write JOIN then by default INNER JOIN is performed. In the example it is also shown.
The following example will make you more clear.

In this example I used data as in example of Difference between Inner join and Outer join
SQL> select s.name,d.deptname from dept d, student s where d.deptid=s.deptid;
NAME DEPTNAME
--------------- ----------
Rafi CSE
Arju CSE

This example represents both INNER join and equijoin.
SQL> select s.name,d.deptname from dept d INNER JOIN student s on d.deptid=s.deptid;
NAME DEPTNAME
--------------- ----------
Rafi CSE
Arju CSE

Above example also represents both INNER join and equijoin.
SQL> select s.name,d.deptname from dept d INNER JOIN student s on d.deptid<>s.deptid;

NAME DEPTNAME
--------------- ----------
Rafi EEE
Raju EEE
Arju EEE
Raju CSE

Above example represents an inner join but not a equijoin.
SQL> select s.name,d.deptname from dept d JOIN student s on d.deptid<>s.deptid;

NAME DEPTNAME
--------------- ----------
Rafi EEE
Raju EEE
Arju EEE
Raju CSE

Above example show JOIN and INNER join keyword is same. If we don't specify INNER then by default inner join is performed.

Is This Answer Correct ?    52 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the maximum size of a dimension? : sql server analysis services, ssas

551


Which tcl commands are available on the sql server?

601


Explain the creation and execution of a user-defined function in the sql server?

571


Explain the properties of a relational table?

555


List out the differences between the clustered index and non-clustered index in sql server?

498






What is the most common trace flags used with sql server?

509


What is public role in sql server?

530


How to create a login account in ms sql server to access the database engine using "create login" statements?

563


What are types of storage modes? : sql server analysis services, ssas

575


What are extended events in sql server?

500


Hi, I Created 3 Tables Person(PersID[prkey],Name,Email,Password), Project(ProjName,ProjID[prkey],ProjLeader,ProjManager) & ProjectInvolvement(EntryDate,ProjID[frkey],PersID[frkey],ProjDuration). For this how can i INSERT,UPDATE & DELETE Through PROCEDURE? Please Post the Answer for me. Desai.

1417


Mention the differences between substr and charindex in sql server.

509


Explain about local stored procedure?

497


Explain what is use of dbcc commands?

507


How to rebuild indexes with alter index ... Rebuild?

583