oracle分页,带有排序字段
select detail_num,carriage_num,ed_date,created_date from
(select rownum id,detail_num,carriage_num,ed_date,created_date from
(select detail_num,carriage_num,ed_date,created_date from xx order by created_date desc) where rownum<=(?)*200
) where id>=(?-1)*200
先对数据库中的所有记录排序,然后再对这些有序的记录分页。如果不这样的话,分页后的数据,每页都是有序的,但是整体无效