3 messages in com.mysql.lists.mysqlRe: why didn't I insert small number ...
FromSent OnAttachments
Xiaobo Chen29 Jun 2006 12:14 
Gerald L. Clark29 Jun 2006 12:32 
Dan Buettner29 Jun 2006 13:32 
Subject:Re: why didn't I insert small number into table?
From:Gerald L. Clark (gera@suppliersystems.com)
Date:06/29/2006 12:32:53 PM
List:com.mysql.lists.mysql

Xiaobo Chen wrote:

Hi, all

I have a table like this:

+----------+---------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +----------+---------+------+-----+---------+-------+ | id_freq | int(11) | | PRI | 0 | | | id_theta | int(11) | | PRI | 0 | | | es | double | | | 0 | | +----------+---------+------+-----+---------+-------+

the values for 'es' is very small, like 10^-8. When I checked the result after running my code, the column for 'es' are still '0's.

Could anybody give a hint why this occured and how to avoid this?

Thanks in advance.

Xiaobo

Double defaults to double(16,4) and you have more than 4 decimal places. Try double(16,10).