Binary_double datatype 实际存储和显示不一致 因为有隐式转换

Oracle中的Binary_double数据类型在存储和显示时可能存在差异,这是因为数据库在操作中进行了隐式转换。当数字与Binary_double交互时,由于Oracle的自动转换机制,可能会导致精度损失。在比较字符和数值类型时,会将字符数据转换为数值。在进行数学运算和比较时,Oracle会根据数值数据类型的优先级进行类型转换,如果转换失败则操作会失败。
摘要由CSDN通过智能技术生成

why binary_double datatype value shows differently

implicit conversion , 把数字转换成 BINARY_DOUBLE, 就会存储为科学记数的样子, 与实际 数字是不一样的。 

 

this data is inexact as  when it be inserted, that because Oracle has implicit conversion.  Oracle Database automatically converts a value from one data type to another when such a conversion makes sense.

 

The following rules govern implicit data type conversions:

  • During INSERT and UPDATE operations, Oracle converts the value to the data type of the affected column.

  • During SELECT FROM operations, Oracle converts the data from the column to the type of the target variable.

  • When manipulating numeric values, Oracle usually adjusts precision and scale to allow for maximum capacity. In such cases, the numeric data type resulting from such operations can differ from the numeric data type found in the underlying tables.

  • When comparing a character value with a numeric value, Oracle converts the character data to a numeric value.

  • Conversions between character values or NUMBER values and floating-point number values can be inexact, because the character types and NUMBER use decimal precision to represent the numeric value, and the floating-point numbers use binary precision.

  • When converting a CLOB value into a character data type such as VARCHAR2, or converting BLOB to RAW data, if the data to be converted is larger than the target data type, then the database returns an error.

  • During conversion from a timestamp value to a DATE value, the fractional seconds portion of the timestamp value is truncated. This behavior differs from earlier releases of Oracle Database, when the fractional seconds portion of the timestamp value was rounded.

  • Conversions from BINARY_FLOAT to BINARY_DOUBLE are exact.

  • Conver

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值