Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the number inside the parenthesis of INTEGER denote?

What does :

value_1 INTEGER(5);

mean ?

I understand that value_1 is an integer but what does 5 mean in the declaration ?

like image 328
saplingPro Avatar asked Oct 16 '25 04:10

saplingPro


1 Answers

In Oracle this means maximal number of decimal digits allowable for number to have.
So, variable of type number(5) can contain 99999, but not 100000.
In fact, that subtype limits you to values -99999 to 99999.

Oracle docs covering number subtypes, of which one is integer.

Oracle docs covering the number type.

like image 168
Egor Skriptunoff Avatar answered Oct 18 '25 21:10

Egor Skriptunoff



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!