lordvader Posted May 14, 2008 Share Posted May 14, 2008 When learning creating tables, I see stuff like INT(11)... what's that paranthesis'd number do? I looked it up on mysql's site but I don't understand: Another extension is supported by MySQL for optionally specifying the display width of integer data types in parentheses following the base keyword for the type (for example, INT(4)). This optional display width is used to display integer values having a width less than the width specified for the column by left-padding them with spaces. The display width does not constrain the range of values that can be stored in the column, nor the number of digits that are displayed for values having a width exceeding that specified for the column. For example, a column specified as SMALLINT(3) has the usual SMALLINT range of -32768 to 32767, and values outside the range allowed by three characters are displayed using more than three characters. That last sentence especially is what I don't understand. Could someone show some examples? Thanks Quote Link to comment Share on other sites More sharing options...
fenway Posted May 14, 2008 Share Posted May 14, 2008 Pretend it doesn't exist... it's a silly throwback, should be deprecated. Quote Link to comment Share on other sites More sharing options...
lordvader Posted May 15, 2008 Author Share Posted May 15, 2008 Alright ty Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.