update rt_order set rt_sn = concat('RT', lpad(id , 12 ,'0')) where 1=1;
concat (A, B) 将 A 、B 数据进行拼接
lpad(a, b,c) 字符串 左侧 填充
a 指定的字段
b 字符串指定的长度,目标长度
c 长度不够时,填充方式
update rt_order set rt_sn = concat('RT', lpad(id , 12 ,'0')) where 1=1;
concat (A, B) 将 A 、B 数据进行拼接
lpad(a, b,c) 字符串 左侧 填充
a 指定的字段
b 字符串指定的长度,目标长度
c 长度不够时,填充方式