Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the precision value needed for Oracle for an Int32?

Tags:

c#

oracle

I have a need to store a CRC signed Int32 value in Oracle. What precision should I use for that?

like image 314
Greg Finzer Avatar asked Oct 12 '12 13:10

Greg Finzer


2 Answers

Since the max value of a signed int is 2,147,483,647 you'd use a precision of 10.

like image 178
D Stanley Avatar answered Nov 14 '22 20:11

D Stanley


32 bits can store 2^32 or slightly more than 4,000,000,000 different numbers, so you'll need a NUMBER(10, 0).

like image 42
Klas Lindbäck Avatar answered Nov 14 '22 20:11

Klas Lindbäck