在MySQL中更改小数点分隔符 [英] Change decimal separator in MySQL

查看:93
本文介绍了在MySQL中更改小数点分隔符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以从."更改小数逗号. (点)到MySQL输出中的其他字符(逗号)?我不想使用像FORMAT这样的函数,我只想使用我通常使用的所有查询,而无需进行任何修改.我正在寻找(一些变量,语言环境等)设置.我试图搜索手册,但没有成功.

Is it possible to change the decimal comma from "." (dot) to other character (comma) in MySQL output? I don't want to use functions like FORMAT, I just want to use all the queries I normaly use without any modification. I'm looking for some setting (of some variable, locale etc.). I tried to search the manual but without success.

推荐答案

不,您不能.这就是SQL标准,而MySQL遵守了这一标准(至少在这一点上).

No, you can't. That's the SQL standard and MySQL complies with it (in that point at least).

问题并不是输出(实际上,大多数DBMS中有各种FORMAT函数),而是INSERT.例如,如果您可以使用逗号,作为小数点(在其他语言环境中很常见)(也用作值分隔符),则插入将变得模棱两可.看到我在问题中的答案: insert-non-english-decimal -points-in-mysql

The problem is not really with output (as you mention, there are various FORMAT functions in most DBMSs) but with INSERT. If you could use comma , for example as decimal point (that's common in other locales) which is aslo used as values separator, Inserts would become ambiguous. See my answer in the question: insert-non-english-decimal-points-in-mysql

这篇关于在MySQL中更改小数点分隔符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆