what is the maximum value allowed for tinyint(2) ?
Is the maximum above allowed value 255 or 99 ? I am confused because (2) after tinyint(2) denotes only the display....am I correct ?
what is the maximum value allowed for tinyint(2) ?
Is the maximum above allowed value 255 or 99 ? I am confused because (2) after tinyint(2) denotes only the display....am I correct ?
MySQL 5.0 Reference Manual: Numeric Types
The display width does not constrain the range of values that can be stored in the column. Nor does it prevent values wider than the column display width from being displayed correctly.
Etc, etc. Lots of good stuff in there.
Edit: No. Note that UNSIGNED
is a non-standard attribute that affects the range. Neither value given in your question is the correct upper-limit of a normal TINYINT(2)
.
Edit for the comment edit: Trust the documentation unless there is a reason not to. If something seems fishy, TIAS (try it and see).
It takes 127.
refer link : http://dev.mysql.com/doc/refman/5.1/en/numeric-types.html