Sorry for the really simple question, but I can't figure it out.
When I set up my schema, I set up my primary key to use a field of type smallint(2)
. The thought behind it was that the field should only ever consist of 2-digit numbers, 1-99.
We've broken the upper limit of that and now I'm seeing 3-digit numbers being added to this field. I'm now speculating that smallint(2)
and varchar(2)
do not function the same, but since I don't understand what's going on with this table I'm getting a little concerned.
What values does a field such as smallint(2)
allow?
Thanks!
SMALLINT
: dev.mysql.com/doc/refman/5.5/en/numeric-type-attributes.htmltinyint(3)
).