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}