What is ResultSetMetaData?
The columns information of a table is provided by the ResultSetMetaData, such as types of columns, properties of columns etc. The result set of a query can be used for detailed information using ResultSetMetaData. It is a class utilized for searching information about the result set that is returned from an executeQuery(). It provides number of columns, data types, name of the columns. It has two methods which are frequently used – getColumnName(), getColumnType().
What is ResultSetMetaData?
ResultSetMetaData is an object that gets information about the types and properties of the columns in a ResultSet object.
ResultSet resultSet1 = statement1.executeQuery("SELECT a, b, c FROM TABLE2");
ResultSetMetaData rsmd = rs.getMetaData();