右补0:select RPAD(id,8,‘0’) as num from tmp;
左补0:select LPAD(id,8,‘0’) as num from tmp;

参数 :
id:为字段名称
8:为补全的位数
0:代表补的参数0

相关文章:

  • 2021-09-27
  • 2021-09-05
  • 2022-12-23
  • 2022-12-23
  • 2021-08-02
  • 2022-12-23
  • 2021-05-08
  • 2022-12-23
猜你喜欢
  • 2021-11-28
  • 2022-12-23
  • 2021-08-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案