mysql 查询不连续数字的sql语句

mysql> select userid+1 from dyt_member t1 where not exists (select userid from dyt_member t2 where t2.userid=t1.userid+1) and length(userid)>5 order by userid limit 1;

posted @ 2010-08-28 11:26  bjf  阅读(1148)  评论(0编辑  收藏  举报