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);

 
The constant indicating that a column does not allow NULL values.
The constant indicating that a column allows NULL values.
The constant indicating that the nullability of a column's values is unknown.
Gets the designated column's table's catalog name.
Parameters
columnthe first column is 1, the second is 2, ...
Return
the name of the catalog for the table in which the given column appears or "" if not applicable
Throws
SQLExceptionif a database access error occurs

Returns the fully-qualified name of the Java class whose instances are manufactured if the method ResultSet.getObject is called to retrieve a value from the column. ResultSet.getObject may return a subclass of the class returned by this method.

Parameters
columnthe first column is 1, the second is 2, ...
Return
the fully-qualified name of the class in the Java programming language that would be used by the method ResultSet.getObject to retrieve the value in the specified column. This is the class name used for custom mapping.
Throws
SQLExceptionif a database access error occurs
@since
1.2
Returns the number of columns in this ResultSet object.
Return
the number of columns
Throws
SQLExceptionif a database access error occurs
Indicates the designated column's normal maximum width in characters.
Parameters
columnthe first column is 1, the second is 2, ...
Return
the normal maximum number of characters allowed as the width of the designated column
Throws
SQLExceptionif a database access error occurs
Gets the designated column's suggested title for use in printouts and displays.
Parameters
columnthe first column is 1, the second is 2, ...
Return
the suggested column title
Throws
SQLExceptionif a database access error occurs
Get the designated column's name.
Parameters
columnthe first column is 1, the second is 2, ...
Return
column name
Throws
SQLExceptionif a database access error occurs
Retrieves the designated column's SQL type.
Parameters
columnthe first column is 1, the second is 2, ...
Return
SQL type from java.sql.Types
Throws
SQLExceptionif a database access error occurs
See Also
Retrieves the designated column's database-specific type name.
Parameters
columnthe first column is 1, the second is 2, ...
Return
type name used by the database. If the column type is a user-defined type, then a fully-qualified type name is returned.
Throws
SQLExceptionif a database access error occurs
Get the designated column's number of decimal digits.
Parameters
columnthe first column is 1, the second is 2, ...
Return
precision
Throws
SQLExceptionif a database access error occurs
Gets the designated column's number of digits to right of the decimal point.
Parameters
columnthe first column is 1, the second is 2, ...
Return
scale
Throws
SQLExceptionif a database access error occurs
Get the designated column's table's schema.
Parameters
columnthe first column is 1, the second is 2, ...
Return
schema name or "" if not applicable
Throws
SQLExceptionif a database access error occurs
Gets the designated column's table name.
Parameters
columnthe first column is 1, the second is 2, ...
Return
table name or "" if not applicable
Throws
SQLExceptionif a database access error occurs
Indicates whether the designated column is automatically numbered, thus read-only.
Parameters
columnthe first column is 1, the second is 2, ...
Return
true if so; false otherwise
Throws
SQLExceptionif a database access error occurs
Indicates whether a column's case matters.
Parameters
columnthe first column is 1, the second is 2, ...
Return
true if so; false otherwise
Throws
SQLExceptionif a database access error occurs
Indicates whether the designated column is a cash value.
Parameters
columnthe first column is 1, the second is 2, ...
Return
true if so; false otherwise
Throws
SQLExceptionif a database access error occurs
Indicates whether a write on the designated column will definitely succeed.
Parameters
columnthe first column is 1, the second is 2, ...
Return
true if so; false otherwise
Throws
SQLExceptionif a database access error occurs
Indicates the nullability of values in the designated column.
Parameters
columnthe first column is 1, the second is 2, ...
Return
the nullability status of the given column; one of columnNoNulls, columnNullable or columnNullableUnknown
Throws
SQLExceptionif a database access error occurs
Indicates whether the designated column is definitely not writable.
Parameters
columnthe first column is 1, the second is 2, ...
Return
true if so; false otherwise
Throws
SQLExceptionif a database access error occurs
Indicates whether the designated column can be used in a where clause.
Parameters
columnthe first column is 1, the second is 2, ...
Return
true if so; false otherwise
Throws
SQLExceptionif a database access error occurs
Indicates whether values in the designated column are signed numbers.
Parameters
columnthe first column is 1, the second is 2, ...
Return
true if so; false otherwise
Throws
SQLExceptionif a database access error occurs
Indicates whether it is possible for a write on the designated column to succeed.
Parameters
columnthe first column is 1, the second is 2, ...
Return
true if so; false otherwise
Throws
SQLExceptionif a database access error occurs