1)I have a table with data as mentioned below
Table Tn (n number(6,3));
SQL> insert into tn values( 123.123) ;
1 row created.
SQL> insert into tn values(0) ;
1 row created.
SQL>insert into tn values(0.123)
1 row created.
Excepted o/p is mentioned below.
n
--------
123.123
000.000
000.123
when i check in google and i found the solution as mentioned below
select to_char(n,'000.000') from t;
can anyone explain above query.I have gone through the format specifiers but still not clear
2)Why the o/p is same in both cases?
select TO_CHAR(9999999.67,'0000000D00') from dual;
select TO_CHAR(9999999.67,'9999999D99') from dual;
I am posting this query after reading format specifiers for numbers?