oracle 的rownum
2016-04-12 15:36
465 查看
版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/u014194661/article/details/51133946
select awmid,yxjstpath,to_char(awmtime,'yyyy-mm-dd') as awmtime,awmaddress,hostempname,joinnum
from (select t.awmid,t.yxjstpath,t.awmtime,t.awmaddress,t.hostempname,t.joinnum from
b_r_assignworkmeeting t where t.yxjstpath is not null and t.deptid =" + deptid + "
order by t.recorddate desc ,t.awmid desc ) where rownum<=10
select t.awmid,t.yxjstpath,t.awmtime,t.awmaddress,t.hostempname,t.joinnum from b_r_assignworkmeeting t
where rownum<=10 and t.yxjstpath is not null and t.deptid =" + deptid + "order by t.recorddate desc ,t.awmid desc
两种查询结果在某种情况下,查询结果不一样, 第一种查询最新10条是正确的。oracle的bug
相关文章推荐
- oracle下rownum在mysql中的实现
- oracle rownum paging issues
- oracle之ROWNUM的查询应用
- 解析oracle的ROWNUM [Oracle ROWNUM 分页]
- oracle rownum的使用
- oracle中的rownum用法详解
- oracle 中的 rownum
- [转] 解析oracle的ROWNUM -- 作者: chen_liang
- oracle中rownum和row_number()
- Oracle Rownum 伪列详解
- oracle中rownum使用注意事项
- [Oracle]高效的PL/SQL程序设计(一)--伪列ROWNUM使用技巧
- Oracle_rownum的使用
- oracle通用分页语句rownum
- ORACLE中用rownum分页并排序的SQL语句
- oracle限制查询条数-rownum用法详解
- Oracle:rownum和ROW_NUMBER()用法和误区
- oracle前10条记录取法(rownum的介绍)
- Oracle的rownum原理和使用
- Oracle中使用Rownum分页详细例子