In this tutorial, we are going to explain how to use Oracle TO_NUMBER function with basic syntax and many examples for better understanding.
TO_NUMBER function convert characters to a number.
TO_NUMBER(string, [format_mask], [nls_parameter] )
- string: The string you want to convert to number.
- format_mask: The format that we can use to convert the value to a string.
- nls_parameter : nls_lang specified to convert value to number in particular language.
Oracle 19c, Oracle 18c, Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i, Oracle 8i
Let’s take some examples about Oracle TO_NUMBER and how to use it:
SELECT TO_NUMBER(5340.86, '9999.99') FROM DUAL;
SELECT TO_NUMBER('21') FROM DUAL;
Similar oracle functions:
In this tutorial, you have learned how to use the Oracle TO_NUMBER function to convert characters to a number .Hopefully, it was clear and concise.