Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
according to jdbc DatabaseMetaData Driver has to return the 24 columns.
Driver actually return only 23 columns, without the last one "IS_GENERATEDCOLUMN".
to reproduced :
DatabaseMetaData dbmd = sharedConnection.getMetaData();
|
ResultSet rs = dbmd.getColumns(null, null, "table1", null); |
while (rs.next()) { |
System.out.println("-------------------------------------------------------"); |
System.out.println("TABLE_CAT : " + rs.getString(1)); |
System.out.println("TABLE_SCHEM : " + rs.getString(2)); |
System.out.println("TABLE_NAME : " + rs.getString(3)); |
System.out.println("COLUMN_NAME : " + rs.getString(4)); |
System.out.println("DATA_TYPE : " + rs.getInt(5)); |
System.out.println("TYPE_NAME : " + rs.getString(6)); |
System.out.println("COLUMN_SIZE : " + rs.getInt(7)); |
System.out.println("BUFFER_LENGTH is not used."); |
System.out.println("DECIMAL_DIGITS " + rs.getInt(9)); |
System.out.println("NUM_PREC_RADIX " + rs.getInt(10)); |
System.out.println("NULLABLE " + rs.getInt(11)); |
System.out.println("REMARKS : " + rs.getString(12)); |
System.out.println("COLUMN_DEF : " + rs.getString(13)); |
System.out.println("SQL_DATA_TYPE int => unused"); |
System.out.println("SQL_DATETIME_SUB int => unused"); |
System.out.println("CHAR_OCTET_LENGTH : " + rs.getInt(16)); |
System.out.println("ORDINAL_POSITION : " + rs.getInt(17)); |
System.out.println("IS_NULLABLE : " + rs.getString(18)); |
System.out.println("SCOPE_CATALOG : " + rs.getString(19)); |
System.out.println("SCOPE_SCHEMA : " + rs.getString(20)); |
System.out.println("SCOPE_TABLE : " + rs.getString(21)); |
System.out.println("SOURCE_DATA_TYPE : " + rs.getShort(22)); |
System.out.println("IS_AUTOINCREMENT : " + rs.getString(23)); |
System.out.println("IS_GENERATEDCOLUMN : " + rs.getString(24)); |
 |
}
|