select t3.* from (
③
select t2.*, rownum as row_num from ( ②
select * from t order by t.id asc ①
) t2 where rownum<=20 ②
) t3
where t2.row_num>11 order by t3.id asc ③
select t2.*, rownum as row_num from ( ②
select * from t order by t.id asc ①
) t2 where rownum<=20 ②
) t3
where t2.row_num>11 order by t3.id asc ③
①给表安id顺序
②给表加一列 唯一rownum 去表的前20 重组表
③取重组 的后 前10