存储过程的PL/SQL Developer测试窗口将数字值转换为科学计数法 [英] PL/SQL Developer Test Window for Stored Procedure turns number value into scientific notation

查看:288
本文介绍了存储过程的PL/SQL Developer测试窗口将数字值转换为科学计数法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用PL/SQL Developer通过测试窗口"来测试接受数字类型值的存储过程.我传递给存储过程的值是37788024213340161.但是,我注意到PL/SQL将该值转换为科学计数法并四舍五入,然后将另一个值传递给存储过程:(3.77880242133402E16)

I'm using PL/SQL Developer using the Test Window to test a Stored Procedure that accepts a value of type Number. The value I'm passing to the Stored Procedure is 37788024213340161. However, I noticed that PL/SQL converts that value to scientific notation and rounds up, and passes a different value to the Stored Procedure instead: (3.77880242133402E16)

因此,执行存储过程时,它最终使用的是四舍五入的值,而不是我打算使用的值.最终传递给存储过程的值是37788024213340200.最后3个数字应该是161,但PL/SQL Developer进行了四舍五入,现在值是200.

Thus, when executing the Stored Procedure, it ends up using the rounded-up value rather than the value I intended it to use. The value that ends up being passed to the Stored Procedure is 37788024213340200. Where the last 3 numbers should have been 161 but PL/SQL Developer rounded up and now the value is 200.

是否有一种方法可以在PL/SQL Developer中设置首选项,以便它不会更改值以在测试窗口"中使用科学计数法?

Is there a way to set the preferences in PL/SQL Developer so it will not change the value to use scientific notation in the Test Window?

推荐答案

您可以尝试在PL/SQL Developer的测试窗口"中查看完整值的另一件事是将类型从浮动"切换为字符串"

Oh another thing you can try to do to view the full value in the Test Window of PL/SQL Developer is to switch the type from "float" to "string"

这篇关于存储过程的PL/SQL Developer测试窗口将数字值转换为科学计数法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆