tibberous Posted December 13, 2010 Share Posted December 13, 2010 I know the default length of a tiny int is less than an int, but if I put in the same length for both, are they essentially the same type? Link to comment https://forums.phpfreaks.com/topic/221468-is-an-int-with-a-length-of-3-different-than-a-tinyint-with-a-length-of-3/ Share on other sites More sharing options...
mikecampbell Posted December 13, 2010 Share Posted December 13, 2010 They aren't the same. The value in parentheses after int or tinyint is the display width, not the number of bytes. tinyint is always one byte (-128 to 127) and int is always 4 bytes (-2147483648 to 2147483647). Link to comment https://forums.phpfreaks.com/topic/221468-is-an-int-with-a-length-of-3-different-than-a-tinyint-with-a-length-of-3/#findComment-1146500 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.