Skip to content

Most visited

Recently visited

navigation
Added in API level 1

ResultSetMetaData

public interface ResultSetMetaData
implements Wrapper

java.sql.ResultSetMetaData
Known Indirect Subclasses


Provides information about the columns returned in a ResultSet.

Summary

Constants

int columnNoNulls

Indicates that a column cannot contain NULL values.

int columnNullable

Indicates that a column can contain NULL values.

int columnNullableUnknown

Indicates that it is unknown whether a column can contain NULLs or not.

Public methods

abstract String getCatalogName(int column)

Returns the title of an indexed column's catalog.

abstract String getColumnClassName(int column)

Returns the fully-qualified type of the class that is produced when invoking ResultSet.getObject to recover this column's value.

abstract int getColumnCount()

Returns number of columns contained in the associated result set.

abstract int getColumnDisplaySize(int column)

Returns the indexed column's standard maximum width, expressed in number of characters.

abstract String getColumnLabel(int column)

Returns a recommended title for the indexed column, to be used when the title needs to be displayed.

abstract String getColumnName(int column)

Returns the title of the indexed column.

abstract int getColumnType(int column)

Returns the type of the indexed column as SQL type code.

abstract String getColumnTypeName(int column)

Returns the type name of the indexed column.

abstract int getPrecision(int column)

Returns the decimal precision of the indexed column.

abstract int getScale(int column)

Returns the number of digits to the right of the decimal point of the indexed column.

abstract String getSchemaName(int column)

Returns the name of the indexed columns schema.

abstract String getTableName(int column)

Returns the title of the indexed columns table.

abstract boolean isAutoIncrement(int column)

Returns an indication of whether the indexed column is automatically incremented and is therefore read-only.

abstract boolean isCaseSensitive(int column)

Returns an indication of whether the case of the indexed column is important.

abstract boolean isCurrency(int column)

Returns whether the indexed column contains a monetary amount.

abstract boolean isDefinitelyWritable(int column)

Returns an indication of whether writing to the indexed column is guaranteed to be successful.

abstract int isNullable(int column)

Returns whether the indexed column is nullable.

abstract boolean isReadOnly(int column)

Returns an indication of whether writing to the indexed column is guaranteed to be unsuccessful.

abstract boolean isSearchable(int column)

Returns an indication of whether the indexed column is searchable.

abstract boolean isSigned(int column)

Returns an indication of whether the values contained in the indexed column are signed.

abstract boolean isWritable(int column)

Returns an indication of whether writing to the indexed column is possible.

Inherited methods

From interface java.sql.Wrapper

Constants

columnNoNulls

Added in API level 1
int columnNoNulls

Indicates that a column cannot contain NULL values.

Constant Value: 0 (0x00000000)

columnNullable

Added in API level 1
int columnNullable

Indicates that a column can contain NULL values.

Constant Value: 1 (0x00000001)

columnNullableUnknown

Added in API level 1
int columnNullableUnknown

Indicates that it is unknown whether a column can contain NULLs or not.

Constant Value: 2 (0x00000002)

Public methods

getCatalogName

Added in API level 1
String getCatalogName (int column)

Returns the title of an indexed column's catalog.

Parameters
column int: the column index, starting at 1.
Returns
String the catalog title.
Throws
SQLException if there is a database error.

getColumnClassName

Added in API level 1
String getColumnClassName (int column)

Returns the fully-qualified type of the class that is produced when invoking ResultSet.getObject to recover this column's value.

Parameters
column int: the column index, starting at 1.
Returns
String the fully-qualified class name.
Throws
SQLException if there is a database error.

See also:

getColumnCount

Added in API level 1
int getColumnCount ()

Returns number of columns contained in the associated result set.

Returns
int the column count.
Throws
SQLException if there is a database error.

getColumnDisplaySize

Added in API level 1
int getColumnDisplaySize (int column)

Returns the indexed column's standard maximum width, expressed in number of characters.

Parameters
column int: the column index, starting at 1.
Returns
int the column's max width.
Throws
SQLException if there is a database error.

getColumnLabel

Added in API level 1
String getColumnLabel (int column)

Returns a recommended title for the indexed column, to be used when the title needs to be displayed.

Parameters
column int: the column index, starting at 1.
Returns
String the column's title.
Throws
SQLException if there is a database error.

getColumnName

Added in API level 1
String getColumnName (int column)

Returns the title of the indexed column.

Parameters
column int: the column index, starting at 1.
Returns
String the column title.
Throws
SQLException if there is a database error.

getColumnType

Added in API level 1
int getColumnType (int column)

Returns the type of the indexed column as SQL type code.

Parameters
column int: the column index, starting at 1.
Returns
int the column type code.
Throws
SQLException if there is a database error.

See also:

getColumnTypeName

Added in API level 1
String getColumnTypeName (int column)

Returns the type name of the indexed column.

Parameters
column int: the column index, starting at 1.
Returns
String the type name.
Throws
SQLException if there is a database error.

getPrecision

Added in API level 1
int getPrecision (int column)

Returns the decimal precision of the indexed column.

Parameters
column int: the column index, starting at 1.
Returns
int the precision.
Throws
SQLException if there is a database error.

getScale

Added in API level 1
int getScale (int column)

Returns the number of digits to the right of the decimal point of the indexed column.

Parameters
column int: the column index, starting at 1.
Returns
int number of decimal places.
Throws
SQLException if there is a database error.

getSchemaName

Added in API level 1
String getSchemaName (int column)

Returns the name of the indexed columns schema.

Parameters
column int: the column index, starting at 1.
Returns
String the name of the columns schema.
Throws
SQLException if there is a database error.

getTableName

Added in API level 1
String getTableName (int column)

Returns the title of the indexed columns table.

Parameters
column int: the column index, starting at 1.
Returns
String the table title.
Throws
SQLException if there is a database error.

isAutoIncrement

Added in API level 1
boolean isAutoIncrement (int column)

Returns an indication of whether the indexed column is automatically incremented and is therefore read-only.

Parameters
column int: the column index, starting at 1.
Returns
boolean true if it is automatically numbered, false otherwise.
Throws
SQLException if there is a database error.

isCaseSensitive

Added in API level 1
boolean isCaseSensitive (int column)

Returns an indication of whether the case of the indexed column is important.

Parameters
column int: the column index, starting at 1.
Returns
boolean true if case matters, false otherwise.
Throws
SQLException if there is a database error.

isCurrency

Added in API level 1
boolean isCurrency (int column)

Returns whether the indexed column contains a monetary amount.

Parameters
column int: the column index, starting at 1.
Returns
boolean true if it is a monetary value, false otherwise.
Throws
SQLException if there is a database error.

isDefinitelyWritable

Added in API level 1
boolean isDefinitelyWritable (int column)

Returns an indication of whether writing to the indexed column is guaranteed to be successful.

Parameters
column int: the column index, starting at 1.
Returns
boolean true if the write is guaranteed, false otherwise.
Throws
SQLException if there is a database error.

isNullable

Added in API level 1
int isNullable (int column)

Returns whether the indexed column is nullable.

Parameters
column int: the column index, starting at 1.
Returns
int true if it is nullable, false otherwise.
Throws
SQLException if there is a database error.

isReadOnly

Added in API level 1
boolean isReadOnly (int column)

Returns an indication of whether writing to the indexed column is guaranteed to be unsuccessful.

Parameters
column int: the column index, starting at 1.
Returns
boolean true if the column is read-only, false otherwise.
Throws
SQLException if there is a database error.

isSearchable

Added in API level 1
boolean isSearchable (int column)

Returns an indication of whether the indexed column is searchable.

Parameters
column int: the column index, starting at 1.
Returns
boolean true if the indexed column is searchable, false otherwise.
Throws
SQLException if there is a database error.

isSigned

Added in API level 1
boolean isSigned (int column)

Returns an indication of whether the values contained in the indexed column are signed.

Parameters
column int: the column index, starting at 1.
Returns
boolean true if they are signed, false otherwise.
Throws
SQLException if there is a database error.

isWritable

Added in API level 1
boolean isWritable (int column)

Returns an indication of whether writing to the indexed column is possible.

Parameters
column int: the column index, starting at 1.
Returns
boolean true if it is possible to write, false otherwise.
Throws
SQLException if there is a database error.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.