My Oracle Support Banner

Value from Column in the Database Is Not Displayed With Exact Same Scale as Sql*Plus When Using JDBC (Doc ID 1362964.1)

Last updated on JULY 29, 2019

Applies to:

JDBC - Version to [Release 10.1 to 11.2]
Information in this document applies to any platform.


The value from the database column is not displayed with the exact same scale when using a Java program with JDBC.

For example:

SQL> create table test(id number(3,2));

Table created

SQL> insert into test values(1.20);

SQL> commit;

SQL> col id for 9.99
SQL> select id from test;


This gives the correct result , but it is not the same if  JDBC Thin driver is used in below code:

The result from the java program is again:



To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.