using of rownum function with quot;gt;quot; sign in oracle(使用带有“的 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 中,没有第一行或最后一行.你所谓的raws",实际上是set(sets),它们可以被订购也可以不被订购.rownum 是一个函数,它只是枚举结果集,只有在计算 set 后才有意义,要对数据集(行)进行排序,您应该在 rownum<之前的查询中进行/code> 调用,你必须告诉 DB 这个命令对于特定的 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:使用带有“>"的 rownum 函数登录 oracle
基础教程推荐
- 如何根据该 XML 中的值更新 SQL 中的 XML 2021-01-01
- 表 './mysql/proc' 被标记为崩溃,应该修复 2022-01-01
- 什么是 orradiag_<user>文件夹? 2022-01-01
- 二进制文件到 SQL 数据库 Apache Camel 2021-01-01
- 在多列上分布任意行 2021-01-01
- oracle区分大小写的原因? 2021-01-01
- MySQL 中的类型:BigInt(20) 与 Int(20) 2021-01-01
- 如何在 SQL 中将 Float 转换为 Varchar 2021-01-01
- 在 MySQL 中:如何将表名作为存储过程和/或函数参数传递? 2021-01-01
- mysql选择动态行值作为列名,另一列作为值 2021-01-01
