substr(string,start) string:要截取的字符串 start:从第几位开始(前面从1开始,后面从-1开始)
select substr('00000'||0,-5); 结果:00000 select substr('00000'||12,-5); 结果:00012 select substr('00000'||123,-5); 结果:00123 select substr('00000'||12345,-5); 结果:12345
补0需要n个,start就用-n