select case a when 0 then 1 else (select max(uuid) from t_user)+1 end as b from (select count(uuid) as a from t_user)
数据库通用自增长列,布布扣,bubuko.com
数据库通用自增长列
原文:http://www.cnblogs.com/BrightMoon/p/3581010.html