Oracle, adding leading zeros to string (not number)

人盡茶涼 提交于 2019-12-03 04:45:21

You can use the LPAD function for that, passing in the string, the length you want it to be, and the character to pad it with. For 10 digits with leading zeroes this would be:

LPAD('12H89', 10, '0')

The return value is the padded string.

See: http://www.techonthenet.com/oracle/functions/lpad.php

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!