ResultSetMetaData

The interface java.sql.ResultSetMetaData provides information about the types and properties of the columns in a ResultSet object.

We create this object by calling getMetaData() method on the ResultSet object.

ResultSetMetaData rsmd = rs.getMetaData();

Once we get the ResultSetMetaData object, we can know the details like the tablename, the number of columns, the name of the column, the data type of the column etc.

Important methods in this interface are

getTableName()

getColumnCount()

getColumnName()

getClumnTypeName()