-
All Superinterfaces:
- Wrapper
-
All Known Subinterfaces:
- RowSetMetaData
-
All Known Implementing Classes:
- RowSetMetaDataImpl
public interface ResultSetMetaData extends Wrapper
An object that can be used to get information about the types and properties of the columns in a
ResultSet
object. The following code fragment creates the
ResultSet
object rs, creates the
ResultSetMetaData
object rsmd, and uses rsmd to find out how many columns rs has and whether the first column in rs can be used in a
WHERE
clause.
ResultSet rs = stmt.executeQuery("SELECT a, b, c FROM TABLE2"); ResultSetMetaData rsmd = rs.getMetaData(); int numberOfColumns = rsmd.getColumnCount(); boolean b = rsmd.isSearchable(1);
isSearchable
boolean isSearchable(int column)
throws SQLException
Indicates whether the designated column can be used in a where clause.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs