Java ResultSet - get Column name based on Index

Viewed 52629

I want to know if there is a way to get a column name based on the index from a resultSet.

I know that if you want to get index based on the columnName, you can do that by using

int index = resultSet.findColumn(columnName);

But I need the other way around, something like :

String column = resultSet.findColumnName(index);

Is it possible?

6 Answers
Related