Entry
Why does tinyint show a size of 4 bytes in mysqlshow when it only needs 1 byte in the database?
What is the difference between a signed and an unsigned tinyint?
Feb 25th, 2000 16:40
Nathan Wallace, daveclark
I checked the doc , chapter 7 in both 3.22 (which I am using) and 3.23,
and between the two I determined that a tinyint requires 1 bytes in the
database and the 4 that mysqlshow is the number of characters that is
used for display.
I also learned that if you define the field as tinyint you get a signed
field with limits of -127 to +127 but if you defined it as tinyint
unsigned your limit is 0 to +255.
Amazing what you can find out when you rtfm!