SELECT *
FROM (SELECT T.*, ROWNUM RN
FROM (select t.jh,
t.depth,
t.vdepth,
t.rt1,
t.rt2,
t.rt3,
t.gr,
t.ac,
t.den,
t.cnl
from LWD t
) T
WHERE ROWNUM <= 10)
WHERE RN >= 1
mybatis xml的写法
SELECT *
FROM (SELECT T.*, ROWNUM RN
FROM (
select t.jh,
t.depth,
t.vdepth,
t.rt1,
t.rt2,
t.rt3,
t.gr,
t.ac,
t.den,
t.cnl
from LWD t) T
WHERE < ! [ CDATA [ ROWNUM <= #{end}] ] >)
WHERE RN >= #{start}
原文:https://www.cnblogs.com/wang66a/p/12069294.html