A table definition that uses the DECIMAL and FLOAT data types. : Float « Data Type « SQL / MySQL






A table definition that uses the DECIMAL and FLOAT data types.

        
mysql>
mysql> CREATE TABLE Catalog
    -> (
    ->     ProductID SMALLINT,
    ->     Price DECIMAL(7,2),
    ->     Weight FLOAT(8,4)
    -> );
Query OK, 0 rows affected (0.01 sec)

mysql>
mysql> drop table Catalog;
Query OK, 0 rows affected (0.00 sec)

   
    
    
    
    
    
    
    
  








Related examples in the same category

1.FLOAT(m, d): Floating-point number, 8-place accuracy (4 byte);
2.FLOAT(10,3)
3.Float type column type
4.FLOAT(19,3) ZEROFILL