当前在线人数16201
首页 - 分类讨论区 - 电脑网络 - 数据库版 -阅读文章
未名交友
[更多]
[更多]
文章阅读:Re: To get the 2nd, 3rd, 4th largest value
[同主题阅读] [版面: 数据库] [作者:saho] , 2007年05月21日15:56:46
saho
进入未名形象秀
我的博客
[上篇] [下篇] [同主题上篇] [同主题下篇]

发信人: saho (向日葵), 信区: Database
标  题: Re: To get the 2nd, 3rd, 4th largest value
发信站: BBS 未名空间站 (Mon May 21 15:56:46 2007)

Actually it is not. Rownum are a pseudocolumn (not a real column). It will
be available after the query statement is processed. You may try this query
to get your result.

select *
  from ( select e.*, rownum rnum
           from ( select emp.*
                    from emp
                   order by salary desc ) e
          where rownum <= 2
       )
where rnum = 2;

【 在 yiyayiyayo (Mera naam Itiaan hai) 的大作中提到: 】
: Yes, <, <=, >, >= are fine.
: Looks like = is not ok.



--


※ 来源:·WWW 未名空间站 海外: mitbbs.com 中国: mitbbs.cn·[FROM: 209.243.]

[上篇] [下篇] [同主题上篇] [同主题下篇]
[转寄] [转贴] [回信给作者] [修改文章] [删除文章] [同主题阅读] [从此处展开] [返回版面] [快速返回] [收藏] [举报]
 
回复文章
标题:
内 容:

未名交友
将您的链接放在这儿

友情链接


 

Site Map - Contact Us - Terms and Conditions - Privacy Policy

版权所有,未名空间(mitbbs.com),since 1996