Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strange problem with integer "127"

Status
Not open for further replies.

lowtide

Programmer
May 17, 1999
24
US
I have a strange problem.<br>
In a table I have a field with a datatype tinyint(3).<br>
In one of my rows the number that I input is 131 but<br>
for some reason it will not allow me to change it to<br>
anything but 127! I have tried different numbers and none<br>
seem to work.<br>
Has anyone seen anything like this before.<br>
<br>
Thanks
 
Yes, (its kind of deceptive with the 3 character size) a &quot;signed&quot; tinyint cannot have a range greater than -128 to 127, the &quot;unsigned&quot; tinyint has a range from 0 to 255. Suggest you change this field to smallint, which has a range of up to 65535.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top