Path: utzoo!attcan!uunet!cucstud!lcain From: lcain@cucstud.UUCP (Leroy Cain) Newsgroups: comp.databases Subject: Re: Sybase bug? Summary: Or does = Union Message-ID: <2099@cucstud.UUCP> Date: 9 Jul 89 17:55:18 GMT References: <637@cullsj.UUCP> <4982@sybase.sybase.com> Organization: Columbia Union College; Takoma Park, MD 20912 Lines: 33 In article <4982@sybase.sybase.com>, jeffl@sybase.Sybase.COM (Jeff Lichtman) writes: > >> > select * from hello where a = 1 or a in (select b from world) > > > > Thus, the predicate a = 1 should be applied to each row of the table > > hello, and would be true for the one row that exists in table hello... > > Thus, the result should contain 1 row. > > > > Yogesh Gupta. This is correct! [ stuff about query plan deleted] > A previous posting had it right: 'or' does not mean 'union'. Well in that case a number of text books need rewriting. A quote from "An Introduction to Database Systems" by C.J. Date page 264: "2. R WHERE c1 OR c2 is defined to be equivalent to ( R WHERE c1 ) UNION ( R WHERE c2 )" > --- > Jeff Lichtman at Sybase > {mtxinu,pacbell}!sybase!jeffl -or- jeffl@sybase.com > "Saints should always be judged guilty until they are proved innocent..." MS-DOS Just say NO!!!!! OS/2 Why???? Leroy Cain; Columbia Union College; Mathematical Sciences Department 7600 Flower Ave. WH406; Takoma Park, Md 20912 (301) 891-4172 uunet!cucstud!lcain