decimal datatype in MYSQL - Mysql Send mail vote down 1 vote down 0 Views : 1579
Tagged in : Mysql
Hi...
Decimal Datatype
Syntax:

decimal(M,D).
-> M denots the maximum number of degits.
-> D denotes number of digits to the right of decimal point.
-> M is larger than the D.
If you use decimal datatype,should specify NOT NULL in creating the table.
Create the table:
create table test(id decimal(3,2) NOT NULL,cost decimal(5,2) NOT NULL);

Insert values into the table:
insert into test values(1.10,500.00);
By - Nirmala, On - 2009-02-02




    Login to add Comments .