查询不连续ID

select city_id from (select city_id from city order by city_id asc) t where not exists (select 1 from city where city_id=t.city_id-1);

posted @ 2017-03-03 16:21  一口毒苹果  阅读(133)  评论(0)    收藏  举报