ignace Posted May 1, 2008 Share Posted May 1, 2008 INTEGER(n) the n in previous code tells the length to integer, 0 <= n <= 255, for example n = 4, am i then only able to create 9999 rows? the mysql.org documentation says it doesn't affect the length at all, meaning that if i write INTEGER(4) i still will be able to create 4 billion rows (unsigned), so what does the n actually do? kind regards, ignace Quote Link to comment https://forums.phpfreaks.com/topic/103753-mysql-data-types/ Share on other sites More sharing options...
fenway Posted May 1, 2008 Share Posted May 1, 2008 Nothing limits the number of rows. Don't specify that (4). Quote Link to comment https://forums.phpfreaks.com/topic/103753-mysql-data-types/#findComment-531215 Share on other sites More sharing options...
ignace Posted May 2, 2008 Author Share Posted May 2, 2008 what does the n then precisly do? does it define the bytes used? 2^n? Quote Link to comment https://forums.phpfreaks.com/topic/103753-mysql-data-types/#findComment-531569 Share on other sites More sharing options...
fenway Posted May 2, 2008 Share Posted May 2, 2008 what does the n then precisly do? does it define the bytes used? 2^n? It specifies "display width"... it's just silly. Data type specifies maximum size. And if you're referring to an auto-increment field, you probably want UNSIGNED, too. Quote Link to comment https://forums.phpfreaks.com/topic/103753-mysql-data-types/#findComment-531671 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.