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

Home -> Community -> Mailing Lists -> Oracle-L -> SQL OR condition ????

SQL OR condition ????

From: Pillai, Rajesh <Rajesh.Pillai_at_nordstrom.com>
Date: Wed, 21 May 2003 16:01:53 -0800
Message-ID: <F001.0059F4B5.20030521160153@fatcity.com>


Hi All,

   Please help me out with this puzzle -

An OR condition in a SQL query WHERE clause is always executed from left to right. True or False?

E.g. If I have (a = b) OR ((c=d) AND (e=f) AND (g=h) AND (i=k)) then first (a=b) will be checked (always) and if it returns false then only it will go to the right side of the OR condition.

AND If I have ((c=d) AND (e=f) AND (g=h) AND (i=k)) OR (a = b) then first ((c=d) AND (e=f) AND (g=h) AND (i=k)) will be checked (always) and if it returns false then only it will go to the right side of OR condition.

TIA,
Rajesh
--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Pillai, Rajesh
  INET: Rajesh.Pillai_at_nordstrom.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Wed May 21 2003 - 19:01:53 CDT

Original text of this message

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