在mysql中插入非英语小数点 [英] Insert non-English decimal points in mysql
本文介绍了在mysql中插入非英语小数点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使mysql理解整数/浮点字段中的非英语小数点?
How can you make mysql understand non-English decimal points in integer/float fields?
setLocale(LC_ALL, 'da_DK.ISO-8859-1');
例如:
0,25 will be inserted as 0
0.25 will be inserted as 0.25
推荐答案
您无法执行此操作的原因之一是逗号,
用于分隔INSERT
语句中的字段值.
One of the reasons you can't do that is that the comma ,
is used for separating field-values in INSERT
statements.
INSERT INTO a(b,c) VALUES (3,4,5)
将是不明确的.
是否应生成 b=3.4 , c=5
或 b=3 , c=4.5
?
Should it result into b=3.4 , c=5
or b=3 , c=4.5
?
这篇关于在mysql中插入非英语小数点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文