Path: dp-news.maxwell.syr.edu!spool.maxwell.syr.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.media.kyoto-u.ac.jp!postnews.google.com!h48g2000cwc.googlegroups.com!not-for-mail
From: "FRAN" <fran_beta@hotmail.com>
Newsgroups: comp.databases.theory
Subject: Re: SQL ... Order of operations with Logical Operators
Date: 20 Jul 2006 01:02:46 -0700
Organization: http://groups.google.com
Lines: 44
Message-ID: <1153382566.253197.151690@h48g2000cwc.googlegroups.com>
References: <1153358386.027419.62340@i3g2000cwc.googlegroups.com>
   <f4Bvg.30240$vl5.20347@tornado.ohiordc.rr.com>
NNTP-Posting-Host: 211.30.202.206
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1153382570 11014 127.0.0.1 (20 Jul 2006 08:02:50 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 20 Jul 2006 08:02:50 +0000 (UTC)
In-Reply-To: <f4Bvg.30240$vl5.20347@tornado.ohiordc.rr.com>
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1),gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: h48g2000cwc.googlegroups.com; posting-host=211.30.202.206;
   posting-account=a1927Q0AAAAaI6A-ACau9oHKjZBuRZN8
Xref: dp-news.maxwell.syr.edu comp.databases.theory:43482


Jay Dee wrote:
> FRAN wrote:
> > Can anyone advise how operations are treated when AND and OR are
> > combined?
> >
> > eg
> >
> > WHERE: Condition 1 > X AND Condition 2 < Y OR Condition 3 = Z
> >
> > Would the result of this query be to return results that
> >
> > a) Satisfied Condition 1 AND Condition 2 or alternatively, Condition 3
> > regarless of Conditions 1 AND 2
> >
> >
> > OR
> >
> > b) Condition 1 AND Condition 2 OR Condition 1 AND Condition 3
> >
> > Thanks
> >
> >
> > Fran
> >
>
>
> It depends.  I thought this was nailed down long ago, but I was
> amazed to learn that there is a well-known product that decided
> to do things differently.
>

It wasn't "Access" was it?

> Generally, we think of AND as being "tighter" than OR.  IOW,
> A AND B OR C is the same as (A AND B) OR C.

I see.

Thanks


Fran

