作者qrtt1 (愚者)
看板Database
标题Re: [SQL ] 查询前十大的资料
时间Thu Oct 19 20:13:32 2006
※ 引述《yoco315 (眠月)》之铭言:
: 就是先依照价钱 group 以後
: 列出前十高的价钱,找出当中最便宜的那个
: 之後把地价大於等於这个价钱的地名都印出来
: 可是 LIMIT 不能用,我就觉得很困惑,无能为力
: 而且老师要求的是要用标准语法,
: 就算 Oracle 能用 LIMIT 我似乎也不能用上他
: 请教前辈们,感谢。
http://owen.sj.ca.us/~rk/howto/sql92.html
此网页的sql92中有LIMIT耶
不过....
specifiction
http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt
<%
Note: The list of <reserved word>s is considerably longer than
the analogous list of <key word>s in ISO/IEC 9075:1989. To assist
users of this International Standard avoid such words in a possible
future revision, the following list of potential <reserved word>s
is provided. Readers must understand that there is no guarantee
that all of these words will, in fact, become <reserved word>s
in any future revision; furthermore, it is almost certain that
additional words will be added to this list as any possible future
revision emerges.
The words are: AFTER, ALIAS, ASYNC, BEFORE, BOOLEAN, BREADTH,
COMPLETION, CALL, CYCLE, DATA, DEPTH, DICTIONARY, EACH, ELSEIF,
EQUALS, GENERAL, IF, IGNORE, LEAVE, LESS, LIMIT, LOOP, MODIFY,
NEW, NONE, OBJECT, OFF, OID, OLD, OPERATION, OPERATORS, OTHERS,
PARAMETERS, PENDANT, PREORDER, PRIVATE, PROTECTED, RECURSIVE, REF,
REFERENCING, REPLACE, RESIGNAL, RETURN, RETURNS, ROLE, ROUTINE,
ROW, SAVEPOINT, SEARCH, SENSITIVE, SEQUENCE, SIGNAL, SIMILAR,
SQLEXCEPTION, SQLWARNING, STRUCTURE, TEST, THERE, TRIGGER, TYPE,
UNDER, VARIABLE, VIRTUAL, VISIBLE, WAIT, WHILE, and WITHOUT.
%>
只是建议要加入的功能,残念!!!
至於有没有通用的解法并不清楚@@
但有人分享了各别的解法
http://dotnet.org.za/thea/archive/2005/02/22/14715.aspx
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 163.26.34.20
※ 编辑: qrtt1 来自: 163.26.34.20 (10/19 20:15)