Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
可能重复: 如果我的号码是一位数,如何在我的号码前面添加一个空格?
我尝试了以下方法:
REGEXP_REPLACE(to_char(myArray(i).myValue), '\d{1}', ' ' || to_char(myArrzy(i).myValue))
lpad (to_char(myArray(i).myValue), 2, ' ')
http://www.adp-gmbh.ch/ora/sql/rpad.html
怎么样:
lpad(myArray(i).myValue,2)
该数字将隐式转换,并且 ' ' 是lpad. SQL小提琴在这里
lpad