mysqlfloating-pointdoublesqldatatypes

What is the maximum precision of the double and float datatypes in MySQL


In MySQL, when you define a double or a float you define the precision like double(10,0). I also noticed you can define those types without a precision (which I assume means the maximum possible value). What is the maximum values for these datatypes and how would it be defined in sql (the (10,0) part of the datatype)?


Solution

  • From a simple google search "mysql data types" you can get to the mySQL manual page:

    http://dev.mysql.com/doc/refman/5.0/en/floating-point-types.html

    This describes the maximum precision of a 4 byte single precision float as 23 and the maximum of a double precision 8 byte float as 53.