Possible Duplicate:
storing money amounts in mysql
I am trying to create a table in my sql db that has several different int columns a name and some other stuff.. but there are two table in which I want to sotre money values in. no more than 3 digit with two decimal places when displaying it.
this is the sql I have written
CREATE TABLE `5050goose` (
`goose_id` int(11) unsigned NOT NULL auto_increment,
`name` varchar(100) NOT NULL default '',
`width` int(8),
`height` int(8),
`normal_fill` int(8),
`our_fill` int(8),
`old_price` smallmoney(8),
`price` smallmoney(8),
PRIMARY KEY (`goose_id`)
) TYPE=MyISAM;
however when I execute this I am getting this error
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'smallmoney(8),
`price` smallmoney(8),
PRIMARY KEY (`goosedown_id`)
) TYPE' at line 8
which clearly says smallmoney is not working for me.. So I would like to know how to store a monetary value in my sql db.