将rownum函数与“>"一起使用登录oracle [英] using of rownum function with ">" sign in oracle

查看:65
本文介绍了将rownum函数与“>"一起使用登录oracle的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过rownum函数i_e(rownum> 3)"选择大于3的行数 例如,如果有25行,而我想按rownum函数检索最后22行. 但是当我写

I want to select the number of rows which are greater than 3 by rownum function i_e "(rownum>3)" for example if there are 25 rows and I want to retrieve the last 22 rows by rownum function. but when I write the

select * from test_table where rownum>3;

它不检索任何行. 谁能帮我解决这个问题. 预先感谢

it retrieve no row. can any one help me to solve this problem. thanks in advance

推荐答案

在RDBMS中,没有第一行或最后一行.您所说的原始"实际上是已设置的(集合),它们可以排序或不排序. rownum是一个函数,它仅枚举结果集,仅在计算出结果集后才有意义,要对数据集(行)进行排序,应在调用rownum之前在查询中进行操作,必须告诉数据库什么表示特定的select语句的顺序.

In RDBMS there is no first or last rows. What you calls "raws" , actually is set(sets), they can be ordered or not. rownum is a function, which is just enumerates result set, it makes sense only after set is calculated, to order your set of data (rows) you should do it in your query before rownum call, you must tell DB what means for the order in particular select statement.

这篇关于将rownum函数与“>"一起使用登录oracle的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆