Gunakan TO_CHAR dan format angka yang diinginkan.
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;
Juga, di SQL*Plus ada format angka default. Anda dapat mengatur numformat
sesuai format yang Anda inginkan:
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