whatever

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

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326641920&siteId=291194637