# Database Discussions > Oracle >  how to store leading zeros in an integer field

## anbu.s

Is there a  way to store leading zeros in an integer field. I cannot change field name to a char field at this stage due to the external application restriction.
At present 051 is stored as 51

Thanks in advance

----------


## skhanal

You can't, you can pad left 0s when you select from the table.

----------


## ramesh_bolla

Oracle doesnot allow to store leading 0's in the number. To overcome this problem, we can use SQL*plus environment command to see the same.

example

SQL> column sal format 09999.99
sql> select sal from emp;

----------


## ramesh_bolla

SQL> column sal format 09999.99
SQL> select sal from emp;

----------


## owbrookie

use an expression to change the datatype to varchar2 and use the lpad or rpad functionality

----------


## owbrookie

sorry for the previous reply. obvoiusly not what you can do.

----------

