I am creating the following table in oracle:
CREATE TABLE TEST
(
DKEY INTEGER NOT NULL PRIMARY KEY,
NOM VARCHAR2(255) NOT NULL
)
When i try to get the type of the DKEY field using this java code, I get the following result:
DatabaseMetaData md = cnx.getMetaData();
ResultSet rsmd = md.getColumns(null, strSchema, strTableName, "%");
while (rsmd != null && rsmd.next()) {
String strTmp = rsmd.getString("SQL_DATA_TYPE"); // this return 0 for field DKEY
int intDType = rsmd.getInt("DATA_TYPE"); // this return 3 for field DKEY
String strFType = rsmd.getString("TYPE_NAME") // this return NUMBER for field DKEY
}
Why do i get NUMBER instead of INTEGER?