Liquid Fire Posted September 28, 2007 Share Posted September 28, 2007 I know this is a really simple question but i never really questioned it before. if i give an int a length of 3 what that mean the max number is 999 or something else? Quote Link to comment Share on other sites More sharing options...
fenway Posted September 28, 2007 Share Posted September 28, 2007 The whole concept of int "length" has always been annoying... bigint(20) is particularly silly. The refman says the following: 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. So basically, pick the right int -- TINYINT, SMALLINT, MEDIUMINT, INT, BIGINT -- the default "length" mysql assigns is the max width anyway. 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.