Mutley Posted July 23, 2007 Share Posted July 23, 2007 At the moment I use "INT" for storing 1 and 2 digit numbers. Is this right? Someone said about FLOAT, how does this differ? Thanks. Quote Link to comment Share on other sites More sharing options...
AndyB Posted July 23, 2007 Share Posted July 23, 2007 int is for integer numbers (1,2,3, 4092, etc.) float is for floating point numbers (1.2, 3.1415, etc.) Quote Link to comment Share on other sites More sharing options...
Wildbug Posted July 24, 2007 Share Posted July 24, 2007 At the moment I use "INT" for storing 1 and 2 digit numbers. Is this right? If you only have (and only will have) one or two digit numbers (0-99) in a column, you can use the TINYINT column and save a little bit of storage space over INT (1 byte vs. 4 bytes per record). Quote Link to comment Share on other sites More sharing options...
jcarouth Posted July 26, 2007 Share Posted July 26, 2007 when storing floating point numbers - especially when arithmetic will be involved (e.g. monetary numbers) - it will be beneficial to use DECIMAL in favor of FLOAT because of the precision. i know this is not what you were asking about, but FLOAT was mentioned and this little caveat is something you will need to be aware of. as for smaller integer numbers, as mentioned above use TINYINT. 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.