右补0:select RPAD(id,8,‘0’) as num from tmp; 左补0:select LPAD(id,8,‘0’) as num from tmp;
参数 : id:为字段名称 8:为补全的位数 0:代表补的参数0
转载自:https://www.cnblogs.com/azhqiang/p/6972947.html
右补0:select RPAD(id,8,‘0’) as num from tmp; 左补0:select LPAD(id,8,‘0’) as num from tmp;
参数 : id:为字段名称 8:为补全的位数 0:代表补的参数0
转载自:https://www.cnblogs.com/azhqiang/p/6972947.html
微信扫码登录