最近用到了postgresql中的to_char將數字轉爲字符串,現將官網的實例蒐集以下sql
除了以上功能外,to_char還有四捨五入的功能ide
select to_char(3.005,'0.99')
返回3.01post
select to_char(3.003,'0.99')
返回的是3.00postgresql
好了有啥問題直接流言一超交流blog