Page 1 of 1

What is the best data type for int values like 5.2 or 3.5?

Posted: Sun Oct 28, 2007 8:44 am
by Citizen
What is the best data type for stuff like 5.2 or 3.5? I know that INT truncates all decimal values.

Posted: Sun Oct 28, 2007 8:52 am
by feyd
FLOAT, DOUBLE, DECIMAL or variables thereof....

Posted: Sun Oct 28, 2007 8:53 am
by Citizen
Is there a difference between them?

Posted: Sun Oct 28, 2007 8:59 am
by feyd
That is something you can research quite easily. ;)

Posted: Sun Oct 28, 2007 9:16 am
by Citizen
Well, I looked up them before asking the question to begin with :)

The kinds of things the manual wont tell me is if there's a performance difference or if one is better than the other for a task that all three can do :)

Posted: Sun Oct 28, 2007 9:55 am
by Benjamin
What are you planning on using it for?

Posted: Sun Oct 28, 2007 3:45 pm
by califdon
Citizen wrote:Well, I looked up them before asking the question to begin with :)

The kinds of things the manual wont tell me is if there's a performance difference or if one is better than the other for a task that all three can do :)
On the contrary, the manual is THE place to get detailed and precise answers to questions like yours. http://dev.mysql.com/doc/refman/4.1/en/ ... rview.html explains the differences quite clearly.