Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The methods to get the column name and column label in JDBC for DB2 are:

  1. For column name:

    String columnName = resultSet.getMetaData().getColumnName(columnIndex);

  2. For column label:

    String columnLabel = resultSet.getMetaData().getColumnLabel(columnIndex);

Note that both getColumnName and getColumnLabel methods are supported in DB2 through JDBC.