sql 怎样查询每段连续数中的最大值?
例如:表table1,只有一个字段n, n 2 3 4 7 8 9 10 20 21 23希望查询得到:2720
其他答案
2,7,20应该是连续数中最小的值吧:select * from table1 t1 where not exists(Select * from table1 where n=t1.n-1)
2010-12-19 09:19
来自北京市
赞(0)点赞赞(0)举报
免责声明:问答内容均来源于互联网用户,房天下对其内容不负责任,如有版权或其他问题可以联系房天下进行删除。




