This code:
DROP DATABASE IF EXISTS `my_db`;
CREATE DATABASE `my_db`;
CREATE TABLE `my_db`.`my_table` (
`id` integer NOT NULL AUTO_INCREMENT,
`multiplier` decimal(18, 10) NOT NULL,
PRIMARY KEY (`id`)
) Engine=InnoDB;
INSERT INTO `my_db`.`my_table` (`multiplier`) VALUES (100000000.0);
It returns an error:
Error Code: 1264. Out of range value for column 'multiplier' at row 1
Why? There are only 9 digits before the comma, while the column should work up to 18 digits - or am I missing something? Thanks.
agiap source
share