I\'ve tried using DECIMAL with (2,2) but it won\'t let me use this.
I simply want to store a number, for example 7.50 or 10.50. I need to keep both numbers after th
CREATE TABLE `salary` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`salary` DECIMAL(10,2) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
DECIMAL(10,2) indicates that salary will hold a total of 10 digits out of which 2 will be after the decimal.
i.e.
8 digits before decimal and 2 digits after decimal.