Sai*_*ala 17
在PL/SQL中使用To_Number函数将字符串转换为数字,例如,请参见下文.
to_number('1210.73', '9999.99') would return the number 1210.73
to_number('546', '999') would return the number 546
to_number('23', '99') would return the number 23
Run Code Online (Sandbox Code Playgroud)
编辑:
在PL/SQL中,您可以使用LENGTH,TRIM和TRANSLATE函数检查字符串是否由数字字符组成.
LENGTH(TRIM(TRANSLATE(string1, ' +-.0123456789', ' ')))
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
74060 次 |
| 最近记录: |