title: Decimal(3,2) values in MySQL are always 9.99
body: <p>I have a field, justsomenum, of type decimal(3,2) in MySQL that seems to always have values of 9.99 when I insert something like 78.3. Why?</p>
  
  <p>This is what my table looks like:</p>
  
  <pre><code>mysql&gt; describe testtable;
  +---------------+--------------+------+-----+---------+----------------+
  | Field         | Type         | Null | Key | Default | Extra          |
  +---------------+--------------+------+-----+---------+----------------+
  | id            | int(11)      | NO   | PRI | NULL    | auto_increment | 
  | firstname     | varchar(20)  | YES  |     | NULL    |                | 
  | lastname      | varchar(20)  | YES  |     | NULL    |                | 
  | justsomenum   | decimal(3,2) | YES  |     | NULL    |                | 
  +---------------+--------------+------+-----+---------+----------------+
  </code></pre>
  
  <p>When I insert something like this and the select:</p>
  
  <pre><code>mysql&gt; insert into testtable (firstname, lastname, justsomenum) values ("Lloyd", "Christmas", 83.5);
  </code></pre>
  
  <p>I get 9.99 when I select.</p>
  
  <pre><code>mysql&gt; select * from testtable;
  +----+-----------+-----------+---------------+
  | id | firstname | lastname  | justsomenum   |
  +----+-----------+-----------+---------------+
  |  1 | Shooter   | McGavin   |          9.99 | 
  |  2 | Lloyd     | Christmas |          9.99 | 
  |  3 | Lloyd     | Christmas |          9.99 | 
  |  4 | Lloyd     | Christmas |          9.99 | 
  +----+-----------+-----------+---------------+
  4 rows in set (0.00 sec)
  </code></pre>
  
  <p>This is MySQL 5.0.86 on Mac OS X 10.5.8.</p>
  
  <p>Any ideas? Thanks.</p>