home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cis.ohio-state.edu!ucbvax!mtxinu!sybase!houdini!jeffl
- From: jeffl@houdini.sybase.com (Jeff Lichtman)
- Newsgroups: comp.databases.sybase
- Subject: Re: Max IN clause
- Message-ID: <27770@sybase.sybase.com>
- Date: 8 Jan 93 20:21:12 GMT
- References: <ROB.93Jan5115202@fosters.med.utah.edu> <wolfgang.726345501@sfu.ca>
- Sender: news@Sybase.COM
- Distribution: comp.database.sybase
- Organization: Committee to Increase The Entropy
- Lines: 19
-
- > Correct me if I'm wrong, but doesn't Sybase convert an expression with
- > IN to a JOIN behind the scenes before executing the query? So you will
- > not really be avoiding a JOIN.
-
- There are two types of IN clauses:
-
- ... where x IN (select a from ...)
-
- ... where x IN (1, 2, 3, 4, 5, ...)
-
- An IN that is followed by a subquery is usually converted to a join.
- The latter type of IN, which is followed by a list of values, is converted
- to the following form:
-
- ... where x = 1 or x = 2 or x = 3 or x = 4 or x = 5 ...
-
- ---
- Jeff Lichtman at Sybase
- {mtxinu,pacbell}!sybase!jeffl -or- jeffl@sybase.com
-