Hi i have a table with a column name as emp id's in ORACLE SQL
Like 12
, 243
, 55457
etc. I want to cast it like in 15 digits to achieve a uniform pattern as below :
000000000000012
000000000000243
000000000055457
Any function to achieve the same ??
lpad
函数使用填充文本将字符串的左侧填充到一定长度:
select lpad(col, 15, '0')
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.