Jump to content

Archived

This topic is now archived and is closed to further replies.

Mateobus

MySql Int data type

Recommended Posts

I thought that in a MyISAM table, if i use an int type and specify a length of 4, it will allow values up to 9999.  This is wrong apparently as the table only help up to 127.  So what is this length based on?  How big will an int of length 10 hold?3?  Thanks for the help.

Share this post


Link to post
Share on other sites
When you specifiy the length it means the length of the number, so if its 4 it'll accept upto a 4 digit number, where as 10 will allows upto a 10 digit number.

Share this post


Link to post
Share on other sites
No. Tinyint can only hold an Integer that is between -128 and 127 when it is signed. If its unsigned it can hold an integer between 0 and 255
Have a look at the Data Types column in this [url=http://www.ilovejackdaniels.com/mysql_cheat_sheet.png]cheat sheat[/url] to see what each data type can hold

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.