标签:sql order by des desc exists esc model sele where
查询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);
标签:sql order by des desc exists esc model sele where
原文地址:https://www.cnblogs.com/gaobo543013306/p/9871359.html