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
- 如何将 Byte[] 插入 SQL Server VARBINARY 列 2021-01-01
- 导入具有可变标题的 Excel 文件 2021-01-01
- 在SQL中,如何为每个组选择前2行 2021-01-01
- 如何使用 pip 安装 Python MySQLdb 模块? 2021-01-01
- 使用 Oracle PL/SQL developer 生成测试数据 2021-01-01
- 以一个值为轴心,但将一行上的数据按另一行分组? 2022-01-01
- SQL 临时表问题 2022-01-01
- 远程 mySQL 连接抛出“无法使用旧的不安全身份验证连接到 MySQL 4.1+"来自 XAMPP 的错误 2022-01-01
- 更改自动增量起始编号? 2021-01-01
- 如何将 SonarQube 6.7 从 MySQL 迁移到 postgresql 2022-01-01
