Home > Database > Mysql Tutorial > body text

Java处理Oracle数据库小数点前面的0丢失问题

WBOY
Release: 2016-06-07 14:58:13
Original
3321 people have browsed it

在有时候会遇到查询的数据没有问题。和Java结合就会有小问题。 当查询的数据为0.03却传递给Java为.03这样的问题。就需要修改sql解决 Java处理Oracle数据库小数点前面的0丢失问题 无 select trim(to_char(字段名(也可以是经过计算的字段的值),'99999999990.99'

在有时候会遇到查询的数据没有问题。和Java结合就会有小问题。
当查询的数据为0.03 却传递给Java为.03这样的问题。就需要修改sql解决
Java处理Oracle数据库小数点前面的0丢失问题
select  trim(to_char(字段名(也可以是经过计算的字段的值),'99999999990.99')) a from table
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!