select
if(count(a.card)=0,'010000000010',CONCAT('0010',lpad(substring(a.card,5,8)+1,8,'0'),'0')) as next_card from
(select card
from user where card like '0010%' order by card desc limit 1) a
随便了
最新推荐文章于 2024-09-12 09:38:47 发布
select
if(count(a.card)=0,'010000000010',CONCAT('0010',lpad(substring(a.card,5,8)+1,8,'0'),'0')) as next_card from
(select card
from user where card like '0010%' order by card desc limit 1) a