Home Database Mysql Tutorial oracle开发技术:溢出错误解决方法

oracle开发技术:溢出错误解决方法

Jun 07, 2016 pm 04:21 PM
oracle Development Technology method overflow solve mistake

Oracle 数值数据类型最多可存储 38 个字节的精度。当将 Oracle 数值转换 为公共语言运行库数据类型时,小数点后边的位数可能过多,这会导致此错误。 解决方法: 使用round()函数: 例如:select min(pval),max(pval),round(avg(pval),5) from hvm_data_dga .

  Oracle 数值数据类型最多可存储 38 个字节的精度。当将 Oracle 数值转换

  为公共语言运行库数据类型时,小数点后边的位数可能过多,,这会导致此错误。

  解决方法:

  使用round()函数:

  例如:select min(pval),max(pval),round(avg(pval),5) from hvm_data_dga .

  round(avg(pval),5) 使数值小数点后按照四舍五入保留5位。

  select round(32/14, 3) from dual;

  输出结果:2.286

  select round(32/14, 2) from dual;

  输出结果:2.29

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

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Solution to Windows Update prompt Error 0x8024401c error Solution to Windows Update prompt Error 0x8024401c error Jun 08, 2024 pm 12:18 PM

Solution to Windows Update prompt Error 0x8024401c error

Function to calculate the number of days between two dates in oracle Function to calculate the number of days between two dates in oracle May 08, 2024 pm 07:45 PM

Function to calculate the number of days between two dates in oracle

How long will Oracle database logs be kept? How long will Oracle database logs be kept? May 10, 2024 am 03:27 AM

How long will Oracle database logs be kept?

The order of the oracle database startup steps is The order of the oracle database startup steps is May 10, 2024 am 01:48 AM

The order of the oracle database startup steps is

How to use interval in oracle How to use interval in oracle May 08, 2024 pm 07:54 PM

How to use interval in oracle

How to see the number of occurrences of a certain character in Oracle How to see the number of occurrences of a certain character in Oracle May 09, 2024 pm 09:33 PM

How to see the number of occurrences of a certain character in Oracle

Oracle database server hardware configuration requirements Oracle database server hardware configuration requirements May 10, 2024 am 04:00 AM

Oracle database server hardware configuration requirements

How much memory does oracle require? How much memory does oracle require? May 10, 2024 am 04:12 AM

How much memory does oracle require?

See all articles