Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the java equivilant to MySQL's smallint [closed]

Tags:

java

mysql

I have a column in a MySQL table calleddead_heat_flag which data type is smallint, and I want to represent this column as one attribute in my Java class. What data type should I use?

like image 213
Rasmita jena Avatar asked Dec 31 '14 07:12

Rasmita jena


1 Answers

As per the comment below, for MySQL's smallint, java's short should cover that value range. Of course, you could also use an int, but keep in mind that it allows many values that the database column does not.

like image 93
Mureinik Avatar answered Oct 17 '22 19:10

Mureinik