Skip to content
Advertisement

SQL: How to get salary format of “$99,999.00”

In my table, the salary is in format “99999”, how do I get it/select it into the format of “$99,999.00”?

Advertisement

Answer

You can use a format mask like the one below. Different format models can be found here.

SQL> SELECT TO_CHAR (99999, 'FM$999,999,999.00') AS formatted_num FROM DUAL;


   FORMATTED_NUM
________________
$99,999.00
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement