问题描述
使用oracle的sql语句实现,怎么做?N1-------------4567910131415要得到如下结果N1-----------4913 问题补充:梦里看花 写道
解决方案
select case when leag(n1,1,0) over(order by n1) - n1 >1 then leag(n1,1,0) over(order by n1) when rowid = (select min(rowid) from tablename) then n1 end from tablename;未测试,应该能行
时间: 2024-10-26 00:44:51