列表查询语句:
select l.* from jc_log l order by l.title desc, l.ip desc
例如当前内容id为: 51736,查询该数据的 rownum
select num1 from (select rownum as num1,a.* from ( 列表查询语句 ) a) b where b.log_id = 51736
例:
select num1 from (select rownum as num1,a.* from (select l.* from jc_log l order by l.title desc, l.ip desc ) a) b where b.log_id = 51736
上一条、下一条 查询语句
select log_id from (select rownum as num1 ,a.* from ( 列表查询语句 ) a) b where b.num1 =13
例:
下一条记录 num1+1 =13; 查询 num1 =13的记录
select log_id from (select rownum as num1 ,a.* from (select l.* from jc_log l order by l.title desc, l.ip desc ) a) b where b.num1 =13
上一条查询 rownum 为 11 的记录
select log_id from (select rownum as num1 ,a.* from (select l.* from jc_log l order by l.title desc, l.ip desc ) a) b where b.num1 =13