View Single Post
Old 02-23-2008, 06:20 AM   #6 (permalink)
Salathe
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

Quote:
Originally Posted by SOCK View Post
TINYINT(2) UNSIGNED (to 99)
TINYINT(2) UNSIGNED still has the normal range of values (0-255) of plain jane TINYINT UNSIGNED. The (2) is only a padding value if the column is declared with ZEROFILL.

To put clearer, if you try to insert a value of 100 into a TINYINT(2) column then it'll work fine. If you try to insert 256, then MySQL will throw back a warning "Out of range value adjusted for column 'id' at row 1" and adjust the value to 255.
Salathe is offline  
Reply With Quote
The Following 2 Users Say Thank You to Salathe For This Useful Post:
DeMo (02-23-2008), SOCK (02-23-2008)