Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/60.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mysql &引用;十进制列的数据被截断_Mysql - Fatal编程技术网

Mysql &引用;十进制列的数据被截断

Mysql &引用;十进制列的数据被截断,mysql,Mysql,我试图将一些测试值添加到我的数据库中,但当我输入十进制值时,我总是将此数据截断为列…错误 例如,我尝试输入以下内容: INSERT INTO `offers` (`id`, `userid`, `amount`, `onebtc`, `price`, `discount`) VALUES (NULL, '6', '14,22', '0', '10,32', '1'); 在此表中: 您是否尝试发送十进制而不是字符串 INSERT INTO offers (id, userid, amount,

我试图将一些测试值添加到我的数据库中,但当我输入十进制值时,我总是将此
数据截断为列…
错误

例如,我尝试输入以下内容:

INSERT INTO `offers` (`id`, `userid`, `amount`, `onebtc`, `price`, `discount`) VALUES (NULL, '6', '14,22', '0', '10,32', '1');
在此表中:


您是否尝试发送十进制而不是字符串

INSERT INTO offers (id, userid, amount, onebtc, price, discount) VALUES (NULL, 6, 14.22, 0, 10.32, 1);

您正在为所有内容发送字符串,因此MySQL必须为您键入cast。

您是否尝试发送十进制而不是字符串

INSERT INTO offers (id, userid, amount, onebtc, price, discount) VALUES (NULL, 6, 14.22, 0, 10.32, 1);
您正在为所有内容发送字符串,因此MySQL必须为您键入cast。

在十进制值中使用“.instaead”,“在十进制值中使用”“instaead”“。”