时间:2021-07-01 10:21:17 帮助过:167人阅读
//查询当前记录的
//oracle 上一条记录
select decode(decode(txbs,‘无‘,null,txbs),lag(t.txbs, 1, 0) over(order by t.cjid),‘是‘,‘否‘)from qb_app_rycj t
//下一条记录
select t.id, lead(t.id, 1, 0) over(order by t.sort,t.eidt_date) as p from cms_article t
Oracle查询当前记录的上一条记录或下一条记录
标签:sort ora rac rom null .so lag bsp date