Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: When to use inner join
> There are two queries:
> 1. SELECT
> RR.*, a.NAME
> FROM
> T_test1 RR INNER JOIN
> T_test2 A
> ON
> A.CODE =RR.LOCCODE
>
> 2.SELECT
> RR.*, a.NAME
> FROM
> T_test1 RR , t_test2 a where A.CODE =RR.LOCCODE
>
> they are giving the same recordset.
> --> when to use Inner join
> -->Is there any diff. b/w these two queries
In addition to Sims' answer, I would say that the query with the explicit JOIN is easier to read.
It will also be more clear if you add joined tables or modify it to an outer join.
Oh, and the explicit JOIN syntax is the SQL 92 and up syntax, while writing everything in the WHERE is the SQL89 syntax.
-- Martijn Tonies Database Workbench - development tool for Oracle, and more! Upscene Productions http://www.upscene.com My thoughts: http://blog.upscene.com/martijn/ Database development questions? Check the forum! http://www.databasedevelopmentforum.comReceived on Thu Mar 23 2006 - 06:54:11 CST
![]() |
![]() |