Skip to Main Content

Breadcrumb

Question and Answer

Chris Saxon

Thanks for the question, venkat.

Asked: August 30, 2016 - 5:43 am UTC

Last updated: August 30, 2016 - 8:39 am UTC

Version: oracle 11g

Viewed 1000+ times

You Asked

Hi Tom,

I have a default Integer assigned to the column. Can you please provide me the guidelines how can I increase the size of the Integer if data is inserting more than 38 numbers.

and Chris said...

You mean a number with more than 38 digits?

You can insert numbers larger than this. But you only get 38 digits of precision:

drop table t purge;
create table t (
  x int
);

insert into t values (10000000000000000000000000000000000000000000000000);
insert into t values (12345678901234567890123456789012345678901234567890);

select * from t;

X                                                                   
10,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000  
12,345,678,901,234,567,890,123,456,789,012,345,678,900,000,000,000  


If you need more precision than this, read:

https://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:9530645800346731533

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