• +91 9723535972
  • info@interviewmaterial.com

JDBC Interview Questions and Answers

Question - What is the main purpose of the ResultSetMetaData interface?

Answer -

This interface gives more information about ResultSet. Each ResultSet object has been associated with one ResultSetMetaData object.

This object will have the details of the properties of the columns like datatype of the column, column name, the number of columns in that table, table name, schema name, etc., getMetaData() method of ResultSet object is used to create the ResultSetMetaData object.

Syntax:

PreparedStatement pstmntobj = conn.prepareStatement(insert_query);
 
ResultSet resultsetobj = pstmntobj.executeQuery(“Select * from EMPLOYEE”);
 
ResultSetMetaData rsmd obj= resultsetobj.getMetaData();

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners