home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.databases:6265 comp.databases.theory:375 comp.databases.oracle:1338
- Newsgroups: comp.databases,comp.databases.theory,comp.databases.oracle
- Path: sparky!uunet!gatech!news.ans.net!cmcl2!prism.poly.edu!sjha
- From: sjha@prism.poly.edu (Salil Kumar Jha)
- Subject: Is this a bug or a limitation of the SQL language
- Message-ID: <1992Aug23.074048.16681@prism.poly.edu>
- Organization: Polytechnic University, New York
- Date: Sun, 23 Aug 92 07:40:48 GMT
- Lines: 16
-
- I tried to do this query in Oracle and DB2 and both failed. I know its
- not allowed but why not?
-
- Assume the use of the classic oracle emp table
-
- select * from emp
- where salary between
- (select salary from emp where ename = 'Larry')
- and
- (select salary from emp where ename = 'John')
-
- Isnt this the best way of finding all people whose salaries lie between those
- of Larry and John (without knowing whose is larger)
-
- sjha@prism.poly.edu
-
-