chris@AUSTIN.LOCKHEED.COM (Chris Wood) (01/12/88)
1. Is it legal SQL syntax to include an ORDER BY clause with a SELECT clause? The "SQL Standard" indicates that ORDER BY is only legal within a CURSOR definition. 2. Can a SELECT clause within a CURSOR definition have a function reference, or only legal column names? 3. Can we use GROUP BYS and/or HAVINGs in conjunction with CURSORS? My source of information is "A Guide to the SQL Standard", by C. J. Date. Chris
sysop@stech.UUCP (Jan Harrington) (01/12/88)
in article <70@coot.AUSTIN.LOCKHEED.COM>, chris@AUSTIN.LOCKHEED.COM (Chris Wood) says: > Posted: Mon Jan 11 14:57:05 1988 > > 1. Is it legal SQL syntax to include an ORDER BY clause > with a SELECT clause? The "SQL Standard" indicates that > ORDER BY is only legal within a CURSOR definition. > The answer to this question depends a lot on your implementation. With Oracle, ORDER BY is legal with an interactive SELECT, regardless of what the SQL standard says. You should check with a given DBMS to be certain. Sorry, but our Prime Oracle pre-compilers are very buggy and we haven't yet gotten anything with cursors to run, so I don't have answers for your other questions. Jan Harrington, sysop Scholastech Telecommunications ihnp4!husc6!amcad!stech!sysop or allegra!stech!sysop ******************************************************************************** Miscellaneous profundity: "No matter where you go, there you are." Buckaroo Banzai ********************************************************************************