Oracle JDBC Driver ResultSet.getMetaData() Does Not Return Precision For NUMERIC Aggregate Function
(Doc ID 1587538.1)
Last updated on MARCH 08, 2017
Applies to:JDBC - Version 10.2.0.1 and later
Information in this document applies to any platform.
Oracle JDBC driver ResultSet.getMetaData().getPrecision() returns 0 instead of 20 for aggregate function max() and min() against a NUMERIC(20) data type.
The issue reproduces with the following :
String strStmt = "select max(c1) from mytable";
PreparedStatement stmt = conn.prepareStatement(strStmt, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY );
ResultSet res = stmt.executeQuery();
ResultSetMetaData metadata = res.getMetaData();
int prec = metadata.getPrecision(1);
=> Result is that precision is 0 instead of 20
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
|This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review.|