DECIMAL(7,2) : Decimal « Data Type « SQL / MySQL






DECIMAL(7,2)

     
mysql>
mysql> CREATE TABLE PENALTIESDEF
    ->       (PAYMENTNO     INTEGER UNSIGNED NOT NULL PRIMARY KEY,
    ->        EmployeeNO      INTEGER UNSIGNED NOT NULL,
    ->        PAYMENT_DATE  DATE NOT NULL,
    ->        AMOUNT        DECIMAL(7,2) NOT NULL);
Query OK, 0 rows affected (0.00 sec)

mysql>
mysql>
mysql>

   
    
    
    
    
  








Related examples in the same category

1.Decimal and Numeric Data Field Syntax When 123.4567 Is Inserted
2.NUMERIC, DEC Synonym for DECIMAL
3.DECIMAL(p, s) Fixed-point number, saved as a character string;
4.DECIMAL(4,2) for price
5.Insert value to a decimal value column
6.DECIMAL(7,2) ZEROFILL NOT NULL
7.Update decimal value
8.Decimal default value