|
|
decimal datatype in MYSQL - Mysql
|
Views : 1579
|
|
Tagged in : Mysql
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
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 |
|
|
|