log(2^32) / log(10) =~ 9.63295986126 log(10^0.63295986126) / log(2) =~ 2.10264714605 > 2 bit log(2^64) / log(10) =~ 19.2659197225 log(10^0.2659197225) / log(2) =~ 0.883366197155 < 2 bit
As you can see 9 digits for Integer doesn't lead to negative values in Integer type.
But 19 digits in Long can cause sign overflow... I usually see NUMBER(18) as type of ID column...
Is it possible to have problem with mapping NUMBER(19) to Long in Hibernate?
log(9'999'999'999'999'999'999) / log(2) =~ 63.1166338029so you can't hold this value in 63 bits (note there are 19 of9). So sign bit will be used... And possibly Hibernate throw error. That is a question...