ResultSetMetaData

Represents the meta data for a ResultSet.

Methods
String getCatalogName(int column)
Returns the catalog name.
String getColumnClassName(int column)
Gets the Java class name of the object that will be returned if ResultSet.getObject is called.
int getColumnCount()
Returns the number of columns.
int getColumnDisplaySize(int column)
Gets the maximum display size for this column.
String getColumnLabel(int column)
Returns the column label.
String getColumnName(int column)
Returns the column name.
int getColumnType(int column)
Returns the data type of a column.
String getColumnTypeName(int column)
Returns the data type name of a column.
int getPrecision(int column)
Gets the precision for this column.
int getScale(int column)
Gets the scale for this column.
String getSchemaName(int column)
Returns the schema name.
String getTableName(int column)
Returns the table name.
boolean isAutoIncrement(int column)
Checks if this an autoincrement column.
boolean isCaseSensitive(int column)
Checks if this column is case sensitive.
boolean isCurrency(int column)
Checks if this is a currency column.
boolean isDefinitelyWritable(int column)
Checks whether a write on this column will definitely succeed.
int isNullable(int column)
Checks if this is nullable column.
boolean isReadOnly(int column)
Checks if this column is read only.
boolean isSearchable(int column)
Checks if this column is searchable.
boolean isSigned(int column)
Checks if this column is signed.
boolean isWritable(int column)
Checks whether it is possible for a write on this column to succeed.

String getCatalogName(int column) throws SQLException

Returns the catalog name.

Parameters:
column - the column index (1,2,...)
Returns:
the catalog name
Throws:
SQLException - if the result set is closed or invalid

String getColumnClassName(int column) throws SQLException

Gets the Java class name of the object that will be returned if ResultSet.getObject is called.

Parameters:
column - the column index (1,2,...)
Returns:
the Java class name
Throws:
SQLException - if the result set is closed or invalid

int getColumnCount() throws SQLException

Returns the number of columns.

Returns:
the number of columns
Throws:
SQLException - if the result set is closed or invalid

int getColumnDisplaySize(int column) throws SQLException

Gets the maximum display size for this column.

Parameters:
column - the column index (1,2,...)
Returns:
the display size
Throws:
SQLException - if the result set is closed or invalid

String getColumnLabel(int column) throws SQLException

Returns the column label.

Parameters:
column - the column index (1,2,...)
Returns:
the column label
Throws:
SQLException - if the result set is closed or invalid

String getColumnName(int column) throws SQLException

Returns the column name.

Parameters:
column - the column index (1,2,...)
Returns:
the column name
Throws:
SQLException - if the result set is closed or invalid

int getColumnType(int column) throws SQLException

Returns the data type of a column.

Parameters:
column - the column index (1,2,...)
Returns:
the data type
Throws:
SQLException - if the result set is closed or invalid

String getColumnTypeName(int column) throws SQLException

Returns the data type name of a column.

Parameters:
column - the column index (1,2,...)
Returns:
the data type
Throws:
SQLException - if the result set is closed or invalid

int getPrecision(int column) throws SQLException

Gets the precision for this column. This method always returns 0.

Parameters:
column - the column index (1,2,...)
Returns:
the precision
Throws:
SQLException - if the result set is closed or invalid

int getScale(int column) throws SQLException

Gets the scale for this column. This method always returns 0.

Parameters:
column - the column index (1,2,...)
Returns:
the scale
Throws:
SQLException - if the result set is closed or invalid

String getSchemaName(int column) throws SQLException

Returns the schema name.

Parameters:
column - the column index (1,2,...)
Returns:
the schema name
Throws:
SQLException - if the result set is closed or invalid

String getTableName(int column) throws SQLException

Returns the table name.

Parameters:
column - the column index (1,2,...)
Returns:
the table name
Throws:
SQLException - if the result set is closed or invalid

boolean isAutoIncrement(int column) throws SQLException

Checks if this an autoincrement column. It always returns false.

Parameters:
column - the column index (1,2,...)
Returns:
false
Throws:
SQLException - if the result set is closed or invalid

boolean isCaseSensitive(int column) throws SQLException

Checks if this column is case sensitive. It always returns true.

Parameters:
column - the column index (1,2,...)
Returns:
true
Throws:
SQLException - if the result set is closed or invalid

boolean isCurrency(int column) throws SQLException

Checks if this is a currency column. It always returns false.

Parameters:
column - the column index (1,2,...)
Returns:
false
Throws:
SQLException - if the result set is closed or invalid

boolean isDefinitelyWritable(int column) throws SQLException

Checks whether a write on this column will definitely succeed. It always returns false.

Parameters:
column - the column index (1,2,...)
Returns:
false
Throws:
SQLException - if the result set is closed or invalid

int isNullable(int column) throws SQLException

Checks if this is nullable column. Returns ResultSetMetaData.columnNullableUnknown if this is not a column of a table. Otherwise, it returns ResultSetMetaData.columnNoNulls if the column is not nullable, and ResultSetMetaData.columnNullable if it is nullable.

Parameters:
column - the column index (1,2,...)
Returns:
ResultSetMetaData.column*
Throws:
SQLException - if the result set is closed or invalid

boolean isReadOnly(int column) throws SQLException

Checks if this column is read only. It always returns false.

Parameters:
column - the column index (1,2,...)
Returns:
false
Throws:
SQLException - if the result set is closed or invalid

boolean isSearchable(int column) throws SQLException

Checks if this column is searchable. It always returns true.

Parameters:
column - the column index (1,2,...)
Returns:
true
Throws:
SQLException - if the result set is closed or invalid

boolean isSigned(int column) throws SQLException

Checks if this column is signed. It always returns true.

Parameters:
column - the column index (1,2,...)
Returns:
true
Throws:
SQLException - if the result set is closed or invalid

boolean isWritable(int column) throws SQLException

Checks whether it is possible for a write on this column to succeed. It always returns true.

Parameters:
column - the column index (1,2,...)
Returns:
true
Throws:
SQLException - if the result set is closed or invalid