Take the 2-minute tour ×  I would like that one of my columns in
a specific table would not get negative numbers. Is there a way
to declare an unsigned int in derby DB ?  share|improve this
question you can use a long. –  jtahlborn Sep 4 '12 at 23:10 add
comment  2 Answers  Q: Is there a way to declare a column
"unsigned int" in a Derby DB table?  A: I believe answer is
"No":  ... HOWEVER ...  You should easily be able to "CAST" the
stored value in any query:  share|improve this answer add
comment  The answer is no. Java (unfortunately) has no support
for unsigned arithmetics.  But you can still use Java's int and
make your own methods to do unsigned arithmetic, like this. Even
better is to create an UnsignedInteger class and let it handle
all that arithmetic.  I don't know if it's worth it though. You
can just use long as jtahlborn suggests.  share|improve this
answer And equivalently, even a 32-bit value (e.g. 0xffffffff)
can be 'cast' to the corresponding unsigned int in your query – 
paulsm4 Sep 4 '12 at