Usa TO_CHAR e il formato numerico desiderato.
SQL> with data(num) as(
2 select 100 from dual union
3 select 1000 from dual union
4 select 10000 from dual union
5 select 1000000 from dual
6 )
7 SELECT TO_CHAR(num, '9,999,999') FROM data;
Inoltre, in SQL*Plus esiste un formato numerico predefinito. Puoi impostare numformat
secondo il formato desiderato:
SQL> set numformat 9,99,999
SQL> SELECT 100000 FROM DUAL;
100000
---------
1,00,000
TO_CHAR(NU
----------
100
1,000
10,000
1,000,000