mysql查询语句中保留小数精度问题
原创在sql在语句中,有时我们会做一些除法运算,例如,lon对于重塑领域,
select lon/1000000.0 as lon from mytable;
我希望它是保留的6小数精度结果 123.123456 实际上,只保留了4位, 123.1235 (四舍五入)
SQL语句 正确写法 : select cast(lon/1000000.0 as decimal(9,6)) as lon from mytable;
版权声明
所有资源都来源于爬虫采集,如有侵权请联系我们,我们将立即删除
上一篇:C++静态库与动态库 下一篇:mongodb跟踪SQL语句及慢查询收集
相关文章
最新文章
- 0.05ms 往返:localhost 为什么不能直接当网站? 2小时前
- Fornax's Guide to Fast Ethernet 2小时前
- Possibly leaked NSA Cyberattack tool behind attacks (2017) 3小时前
- Steve Wozniak on Writing Apple Integer Basic 3小时前
- PayByPhone is stealing $50M/year from their users 3小时前
- Grand Theft Auto 6: A Landmark Achievement That Redefines a Console Generation 3小时前
- Research Acceleration: The Jagged Frontier 4小时前
- Google Embraces Geothermal Technology to Vaporize Rock for Clean Power 5小时前
- Microsoft's Agent Framework PyPI package compromised to steal credentials 6小时前
- Nvidia's Seven Billionaires Have Lost a Third of Their Wealth 6小时前
itfan123


