Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

appropriate mapping to java type for oracle sequence

Tags:

java

oracle10g

probably this is a real beginner question, but i cannot find an answer on the web. I have a Oracle db, with a table whose primary key is a NUMBER(16) and is filled with a sequence, whose max value is 999999999999999999999999999 .

what java type should i use to hold the sequence value ? long, biginteger or bigdecimal?

thank you in advance


1 Answers

Long should do as it has a maximum value of 2^63 - 1

like image 55
Faisal Feroz Avatar answered May 19 '26 16:05

Faisal Feroz