MySQL Error: Out of range value for column 'amount' at row 1
<p>MySQL</p>

<pre><code>create table tran (
id int,
amount float(9,3)
);

insert into tran (id, amount) values (1, -1000000)
;
</code></pre>

<p>Error: Out of range value for column 'amount' at row 1</p>

<p>The amount of -1000000 is 7 digits, so wouldnt the 9 in the float be more than enough?</p>

<p>The manual says 
"(M,D) means than values can be stored with up to M digits in total"</p>

<p><a href="http://dev.mysql.com/doc/refman/5.7/en/floating-point-types.html" rel="nofollow">http://dev.mysql.com/doc/refman/5.7/en/floating-point-types.html</a></p>

<p><a href="http://sqlfiddle.com/#!9/aa6cc" rel="nofollow">http://sqlfiddle.com/#!9/aa6cc</a></p>