Skip to Main Content
  • Questions
  • Formatting numeric fields with TO_CHAR

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question.

Asked: August 13, 2016 - 10:37 am UTC

Last updated: August 15, 2016 - 1:22 am UTC

Version: 11.0

Viewed 1000+ times

You Asked

There is one table.How sir.

table1(input)...........target(output).

1 0000000001
12 0000000012
123 0000000123
1234 0000001234
12345
123456

and Connor said...

SQL> select 123, to_char(123,'FM0000000000000') x from dual;

       123 X
---------- --------------
       123 0000000000123



Is this answer out of date? If it is, please let us know via a Comment