What is ResultSetMetaData in Java?

What is ResultSetMetaData?

- ResultSetMetaData is a class which provides information about a result set that is returned by an executeQuery() method. JDBC details interrogation can be done by using ResultSetMetaData. It includes the information about the names of the columns, number of columns, data type they contain etc. Some of the methods are:

- getColumnClassName(), getColumnName(), getColumnType(), getColumnTypeName(), getPrecision(), getTableName(), isReadOnly(), isWritable() etc.

- ResultSetMetaData Interface holds information about the columns in a ResultSet.

- ResultSetMetaData is an object that gets information about the types and properties of the columns in a ResultSet object.

Example:
ResultSet resultSet1 = statement1.executeQuery("SELECT a, b, c FROM TABLE2");
ResultSetMetaData rsmd = rs.getMetaData();
CacheRowset, JDBCRowset and WebRowset in Java.
A CacheRowSet object is a container for rows, that ‘caches’ the rows in the memory...
Different types of locks in JDBC
A lock is a preventive software mechanism that other users can not use the data resource...
How are Observer and Observable used in Java?
All the objects which are the instances of the sub class Observable, maintains a list of observers...
Post your comment