mysql查找某连续字段中断的编号
Posted 世事浮云
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysql查找某连续字段中断的编号相关的知识,希望对你有一定的参考价值。
查询dj_pxlb表中zwh 空缺的值
select model2.zwh-1 as kqzwh from (select model1.zwh from dj_pxlb as model1 where model1.ccbh =‘abc‘ order by model1.zwh desc) as model2 where model2.zwh>1 and not exists (select model3.zwh from dj_pxlb as model3 where model3.ccbh =‘abc‘ and model3.zwh=model2.zwh-1);
以上是关于mysql查找某连续字段中断的编号的主要内容,如果未能解决你的问题,请参考以下文章