日期:2014-05-18 浏览次数:20528 次
if exists(select 1 from tb a where no>(select min(no) from tb) and not exists(select 1 from tb where no=a.no-1)) select '不连续' else '连续'
------解决方案--------------------
if exists(select 1 from tb group by no having max(no)-min(no)+1=count(*)) print '存在'