You must Sign In to post a response.


What is the difference between Inner Join and where clause.
It is just personal choice to use either or is one benifits over other.

Please reply


#335715    Author: Rajesh Ranjan  07 Jan 2009 Member Level: Gold   Points : 2

Hi friend,

It's very simple, Any type of join, join two or more then two tables but where condition can't join table.
same for inner Join also.

Rajesh Ranjan

#335717    Author: Preet  07 Jan 2009 Member Level: Gold   Points : 3

As far as I know both of the following queries will producr same result:-

SELECT tb1.a,tb1.b,tb2.c
FROM tb1, tb2
WHERE tb1.a=tb2.a

SELECT tb1.a,tb1.b,tb2.c
FROM tb1
ON tb1.a=tb2.a

that means same task can be done by INNER JOIN and WHERE

thats why i want to know the difference.

#335723    Author: Suresh.B  07 Jan 2009 Member Level: Bronze   Points : 4

Hi Preet,

Inner Join is Entirely different from WHERE clause..

Inner Join is Used to Extract the Data's from 1 or more tables Where as WHERE clause is a conditional Statement...

For (Eg)

Select * From Table1
Inner Join Table2 On Table1.Field = Table2.Field
Where TAble1.Field = Contional Statement.

Here Inner Join Used to Extract data's from 2 Tables but where condition is used to extract the particular record which satisfies the condition.

Hope U got...


#335732    Author: Babu Akkandi    07 Jan 2009 Member Level: Gold   Points : 2


Both are having same functionality. No performance difference for INNER JOIN.

Advantage of using Inner Join is: clarity and ease of understanding, also it is standard SQL

Only difference is synatx of using

Hope it Helps!

Thanks and Regards,
Babu Akkandi

#335803    Author: divya  07 Jan 2009 Member Level: Gold   Points : 2

No performance difference btwn both
advantage for join: clarity and ease of understanding, also it is standard sql

no performance difference for INNER JOIN

#335914    Author: Tejinder Singh Barnala    08 Jan 2009 Member Level: Gold   Points : 4

where this discuusion is going,

select * from a,b
where =


select * from a
inner join b on =

both are syntax of inner join, first one is ansi standard for writting inner join
second one is T-sql standard

then how there can be any difference between execution of both

the only differnce is that while using ansi standard join you can't tell which type of value lookup is used for that join suppose
you want matching value trough nested loop then you can define it in t-sql standard join

select * from a
inner loop join b on =

that's what i know, if i am wrong, please correct me

Many Thanks
Tejinder Singh Barnala
/*I have the simplest tastes. I am always satisfied with the best*/

This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.