Oracle分页
查询语句:
select * FROM A_WECHAT WHERE 1=1
查询记录总数:
SELECT nvl(count(*),0) as totalNum
FROM (
select * FROM A_WECHAT WHERE 1=1
) where 1=1
分页:
SELECT
*
FROM
(
SELECT
TIN.*, ROWNUM AS rowno
FROM
(
select * FROM A_WECHAT WHERE 1=1 order by OPENID desc
) TIN
WHERE
ROWNUM <= 50 ) TOUT
WHERE
TOUT.rowno >= 1