Decimal and Numeric Data Field Syntax When 123.4567 Is Inserted : Decimal : Data Type SQL / MySQL


SQL / MySQL » Data Type » Decimal »

 

Decimal and Numeric Data Field Syntax When 123.4567 Is Inserted



+------------+-------------+---------+----------------------------------------------+ 
| Syntax     |Code         | Display |Description                                   |
+------------+-------------+---------+----------------------------------------------+ 
|DECIMAL(w,d)|DECIMAL(5,2|123.46   |Number has been rounded up                    |
+------------+-------------+---------+----------------------------------------------+ 
|NUMERIC(w,d)|NUMERIC(7,4|123.4567 | Exact fit. (digits, decimal places)      |
+------------+-------------+---------+----------------------------------------------+ 
|DECIMAL(w)  |DECIMAL(9)   |123      |No decimal specified: defaults to decimal.  |
|            |             |         |(digits, padded places to left of number|
+------------+-------------+---------+----------------------------------------------+ 
|DECIMAL     |DECIMAL      |123      |Default: 10 digits, decimal places.         |    
|            |             |         | (10 digits, padded places to left of number)|
+------------+-------------+---------+----------------------------------------------+ 
           
       



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

SQL / MySQL

 Navioo Data Type
» Decimal