Mega Code Archive

 
Categories / MySQL / Data Type
 

FLOAT(m, d)

The optional values m and d give the desired number of places before and after the decimal point in SELECT results; these values have no influence on the actual way the numbers are stored. mysql> mysql> CREATE TABLE a (     ->  id INT NOT NULL AUTO_INCREMENT,     ->  choice FLOAT,     ->  PRIMARY KEY (id)); Query OK, 0 rows affected (0.00 sec) mysql> mysql> mysql> drop table a; Query OK, 0 rows affected (0.00 sec)