What is java equivilant for MySQL smallint
As per the comment below, for MySQL smallint , java short
must cover this range of values. You can of course also use int
, but keep in mind that it allows many values ββthat the database column does not have.
source to share
A short value in java is equivalent to a small int since the range is the same. It has a minimum value of -32,768 and a maximum value of 32,767 (inclusive).
http://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html for java https://docs.oracle.com/cd/E19501-01/819-3659/gcmaz/ for database
source to share
I believe the datatype equivalent will be short
based on what I found here for java and here for a db that uses smallint . They both address the same range of values.
source to share