Retrieves a ResultSetMetaData object that contains
information about the columns of the ResultSet object
that will be returned when this PreparedStatement object
is executed.
Because a PreparedStatement object is precompiled, it is
possible to know about the ResultSet object that it will
return without having to execute it. Consequently, it is possible
to invoke the method getMetaData on a
PreparedStatement object rather than waiting to execute
it and then invoking the ResultSet.getMetaData method
on the ResultSet object that is returned.
NOTE: Using this method may be expensive for some drivers due to the lack of underlying DBMS support.
ResultSet object's columns or
null if the driver cannot return a
ResultSetMetaData object
SQLException | if a database access error occurs or
this method is called on a closed PreparedStatement | |
SQLFeatureNotSupportedException | if the JDBC driver does not support this method |
Diagram: Statement