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

Home -> Community -> Usenet -> comp.databases.theory -> Re: Grammatical Inconsistencies

Re: Grammatical Inconsistencies

From: Laconic2 <laconic2_at_comcast.net>
Date: Mon, 26 Apr 2004 09:23:34 -0400
Message-ID: <I6Kdncenw4u9kBDdRVn-uQ@comcast.com>


Dawn,

SQL does not distinguish between join conditions and restriction conditions. SQL stuffs them all in the WHERE clause.

There are other languages that don't do that. They might have a construct like:

E IN EMPLOYEES JOIN D IN DEPARTMENTS OVER DEPARTMENT_ID This gets messy if the column names are different in the two tables.

It can be good practice for SQL programmers to put all the join conditions ahead of the
restirction conditions in the WHERE CLAUSE, as a matter of programming style. It makes desk
checking easier.

That of course, presumes that the optimizer won't be misled by the order in which predicates
combined by AND OR and NOT are presented. Received on Mon Apr 26 2004 - 08:23:34 CDT

Original text of this message

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