select * from ( select row_.*, rownum rownum_ from (
select * from upm_role r where 1=1 and i_role_type in(0,1,4) and i_status = 0 and r.i_domain_id=1 order by c_create_time DESC,i_id asc
) row_ where 30 >= rownum )
where rownum_ > 0
如上 ,如果c_create_time 有重复的时间,会出现分页错误
解决方案: 增加红色标记部分排序
本文介绍了一种在使用特定SQL查询进行分页时出现错误的情况,特别是当创建时间c_create_time存在重复值时。通过调整排序方式来解决这一问题。

929

被折叠的 条评论
为什么被折叠?



