value can either be a number or date that will be converted to a string.
format_mask is optional. This is the format that will be used to convert value to a string.
nls_language is optional. This is the nls language used to convert value to a string. Let's look at some Oracle TO_CHAR function examples and explore how to use the TO_CHAR function in Oracle/PLSQL. with Numbers For example: The following are number examples for the TO_CHAR function. TO_CHAR(1210.73, '9999.9') Result: ' 1210.7' TO_CHAR(-1210.73, '9999.9') Result: '-1210.7' TO_CHAR(1210.73, '9,999.99') Result: ' 1,210.73' TO_CHAR(1210.73, '$9,999.00') Result: ' $1,210.73' TO_CHAR(21, '000099') Result: ' 000021'
Question : What value is returned after executing the following statement? TO_NUMBER('1210.73', '9999.99')
string1 is the string that will be converted to a number.
format_mask is optional. This is the format that will be used to convert string1 to a number.
nls_language is optional. This is the nls language used to convert string1 to a number. Let's look at some Oracle TO_NUMBER function examples and explore how to use the TO_NUMBER function in Oracle/PLSQL.
For example: TO_NUMBER('1210.73', '9999.99') Result: 1210.73 TO_NUMBER('546', '999') Result: 546 TO_NUMBER('23', '99') Result: 23 Since the format_mask and nls_language parameters are optional, you can simply convert a text string to a numeric value as follows: TO_NUMBER('1210.73') Result: 1210.73