# 用户账号:1-4位:入职年份;5-6位:入职月份;7-11位:员工入职顺序号
select concat(
date_format(now(),'%Y'),
date_format(now(),'%m'),
LPAD(LAST_INSERT_ID()+1,5,'0')
);
# 注释: # %M:November # m:11
推荐文献
[2] mysql进行字符串处理
[3] MySQL常用字符串函数
# 用户账号:1-4位:入职年份;5-6位:入职月份;7-11位:员工入职顺序号
# 注释: # %M:November # m:11
推荐文献
[2] mysql进行字符串处理
[3] MySQL常用字符串函数
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。