home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / database / sybase / 645 < prev    next >
Encoding:
Internet Message Format  |  1993-01-09  |  1.0 KB

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