What would be the datatype in java equivalent to the PL/SQL datatype BINARY_INTEGER?
3 Answers
According to the Oracle documentation, we can map it to either oracle.sql.NUMBER or a straightforward int primitive.
Comments
BINARY_INTEGER is a subtype of INTEGER and ranges from -2^31 to 2^31, same size as the int type in java, so you could use int.
(Another equivalent type in PL/SQL to BINARY_INTEGER is PLS_INTEGER and this one is faster in most operations).