Ask Your Question
0

What are the equivalent methods to getColumnName and getColumnLabel in JDBC for DB2?

asked 2023-07-17 07:29:17 +0000

devzero gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-07-17 07:54:02 +0000

ladyg gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-07-17 07:29:17 +0000

Seen: 10 times

Last updated: Jul 17 '23