Page 1 of 1

size of tinyint(1)

Posted: Wed Oct 28, 2009 5:48 am
by ranjitbd
unsigned tinyint(3) can take maximum value 256.....
if a table id(which is primary key and auto increment) is set data type tinyint(1)
then what will be the maximum value for the id?

Re: size of tinyint(1)

Posted: Wed Oct 28, 2009 7:01 am
by onion2k
255 if it's unsigned. The column size (and thus maximum number that can be stored) isn't affected by the number in the brackets - that number is the display width. http://dev.mysql.com/doc/refman/5.0/en/ ... types.html