Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Join Predicate Question

Re: Join Predicate Question

From: <kennethkoenraadt_at_no-spam.hotmail.com>
Date: Wed, 18 Sep 2002 15:39:41 GMT
Message-ID: <3d889c19.397090@news.mobilixnet.dk>


On Wed, 18 Sep 2002 08:38:26 -0400, dudester <mochaone_at_zdnetmail.com> wrote:

>Let's say you have the following query:
>
>
>Select
> From Claims C Inner Join
> Members M
>On C.EmpID = M.EmpID
>
>
>I understand what that does. But what if you have the following:
>
>Select
> From Claims C Inner Join
> Members M
>On C.EmpID = M.EmpID
>and C.BirthDt >= '1980-01-01'
>
>
>Is that more efficient that placing the additional predicate in a Where
>clause? I guess I'm trying to find out if there is any difference
>between that statement and this one:
>
>Select
> From Claims C Inner Join
> Members M
>On C.EmpID = M.EmpID
>Where C.BirthDt >= '1980-01-01'
>

Hi Dudester,

It is not more efficient and the result set is the same. The benefit of the latter is that it separates the join clause from the other clauses, which is more readable.

In your simple query, both are quite readable, but consider a join over 6 columns and 20 other where clauses.....then separating the join predicates is definitely more readable.

Received on Wed Sep 18 2002 - 10:39:41 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US