前端之家收集整理的这篇文章主要介绍了
postgresql to_char数字转换,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
最近用到了postgresql中的to_char将数字转为字符串,现将官网的实例搜集如下
除了以上功能外,to_char还有四舍五入的功能
1
|
select
@H_ 403_20@to_char(3.005,
'0.99'
@H_ 403_20@)
|
返回3.01
to_char(3.003,monospace!important; font-size:1em!important; min-height:inherit!important; background:none!important">)