Re: Operator and condition precedence
From: Michael Moore <michaeljmoore_at_gmail.com>
Date: Wed, 9 Sep 2009 09:38:40 -0700
Message-ID: <26fdee6e0909090938o2855005arc97a21b0d1bc6f24_at_mail.gmail.com>
Hi,
Just read the doc that your link points to. That documentation *does* seem to contradict my observations. For example:
Date: Wed, 9 Sep 2009 09:38:40 -0700
Message-ID: <26fdee6e0909090938o2855005arc97a21b0d1bc6f24_at_mail.gmail.com>
Hi,
Just read the doc that your link points to. That documentation *does* seem to contradict my observations. For example:
select * from dual where
1/0 = 1 and 'x' = 'y';
Results in "No rows returned."
Obviously the 'x' = 'y' is evaluating to FALSE and "1/0 = 1" is never evaluated.
reversing the predicates like this:
select * from dual where 'x' = 'y' and 1/0 = 1;
results in "ORA-01476: divisor is equal to zero"
Obviously, at least my case, the predicates are being evaluated in REVERSE order.
This seems to be in direct contradiction to the documentation which states:
"Predicates without any user-defined functions, type methods, or subqueries
are evaluated first, in the order specified in the WHERE clause." - *OracleŽ
Data Cartridge Developer's Guide
10g Release 1 (10.1)*
Part Number B10800-01
Mike
>
>
-- http://www.freelists.org/webpage/oracle-lReceived on Wed Sep 09 2009 - 11:38:40 CDT