Need help regarding jdbc metadata. I am using ResultsetMetaData to retrieve the metadata of table columns in Oracle10g . I am using ojdbc14.jar. The table ID contains the Number field. This field is read using jdbc at run time to retrieve metadata attributes. ResultSetMetaData.getColumnClassName () returns java.math.BigDecimal , while I expect it to be integer or int or long or long. I even tried to create a table with an instruction with an explicit definition of type int for the ID column as
CREATE TABLE COST_DETAILS ( ID **INT** Primary Key...
but still, ResultSetMetaData returns a BigDecimal column for the identifier.
Is there a way to create a table with any specific column type so that it returns an int / long type?
or is ResultsetMetaData always returns BigDecimal for Oracle.
source
share