ㄓㄤㄑㄧㄤ

mysql查询字段时实现左右补零

右补0:select RPAD(id,8,'0') as pad from tmp; 
左补0:select LPAD(id,8,'0') as pad from tmp;

posted @ 2017-06-09 17:26  ㄓㄤㄑㄧㄤ  阅读(15023)  评论(0)    收藏  举报
哈哈,页脚部分。