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
基础教程推荐
- 在 SQL 中连接多个表 2021-01-01
- 是否可以执行按位分组功能? 2021-01-01
- 无法解决整理冲突 2021-01-01
- SQL:使用来自具有相同列名的两个表中的数据... 2021-01-01
- 如何使用 mysql.connector 禁用查询缓存 2022-01-01
- 需要 MySQL 5.1 中的抽象触发器来更新审计日志 2021-01-01
- 将 SQL Server DateTime 列迁移到 DateTimeOffset 2021-01-01
- SSMS 中的权限问题:“对象 'extended_properties'、数据库 'mssqlsystem_resource'、... 错误 229)上的 SELECT 权限被拒绝" 2022-01-01
- SQL Server 实例在登录协商期间返回无效或不受支持的协议版本 2021-01-01
- SQL 效率:WHERE IN 子查询 vs. JOIN 然后 GROUP 2021-01-01
