public interface ResultSetMetaData extends Object
All ResultSetMetaData methods return information related to ResultSets. You can use them to dynamically discover the characteristics of a ResultSet.
columnNoNulls
public static final int columnNoNulls
This specifies that NULL values aren’t allowed.
columnNullable
public static final int columnNullable
This specifies that NULL values are allowed.
columnNullableUnknown
public static final int columnNullableUnknown
This specifies that the nullability is unknown.
getCatalogName
public String getCatalogName(int column) throws SQLException
This gets the column’s table’s catalog name.
Parameters:
columnIndex: | The column index begins at 1. |
Returns: The column name; "" if no catalog name available
getColumnClassName
public String getColumnClassName(int columnIndex) throws SQLException
This gets the fully qualified name of the Java class used by ResultSet. getObject() when retrieving the column value.
Parameters:
columnIndex: | The column index begins at 1. |
Returns: The fully qualified class name
getColumnCount
public int getColumnCount() throws SQLException
This gets the number of columns in the ResultSet.
Returns: The number
getColumnDisplaySize
public int getColumnDisplaySize(int column) throws SQLException
This gets the column’s normal maximum width in characters.
Parameters:
columnIndex: | The column index begins at 1. |
Returns: The maximum width
getColumnLabel
public String getColumnLabel(int column) throws SQLException
This gets the suggested column label.
Parameters:
columnIndex: | The column index begins at 1. |
Returns: The suggested column label
getColumnName
public String getColumnName(int column) throws SQLException
This gets a column’s name.
Parameters:
columnIndex: | The column index begins at 1. |
Returns: The column name
getColumnType
public int getColumnType(int column) throws SQLException
This gets a column’s SQL type.
Parameters:
columnIndex: | The column index begins at 1. |
Returns: The SQL type
See also: Types
getColumnTypeName
public String getColumnTypeName(int column) throws SQLException
This gets a column’s data source–specific type name.
Parameters:
columnIndex: | The column index begins at 1. |
Returns: The type name
getPrecision
public int getPrecision(int column) throws SQLException
This gets a column’s number of decimal digits.
Parameters:
columnIndex: | The column index begins at 1. |
Returns: The precision
getScale
public int getScale(int column) throws SQLException
This gets a column’s number of digits to right of decimal.
Parameters:
columnIndex: | The column index begins at 1. |
Returns: The scale
getSchemaName
public String getSchemaName(int column) throws SQLException
This gets a column’s table schema.
Parameters:
columnIndex: | The column index begins at 1. |
Returns: The schema name; "" if no schema name available
getTableName
public String getTableName(int column) throws SQLException
This gets a column’s table name.
Returns: The table name; "" if not available
isAutoIncrement
public boolean isAutoIncrement(int column) throws SQLException
This checks whether the column’s value is auto-incremented.
Parameters:
columnIndex: | The column index begins at 1. |
Returns: true if the column is auto-incremented
isCaseSensitive
public boolean isCaseSensitive(int column) throws SQLException
This checks whether a column is case sensitive.
Parameters:
columnIndex: | The column index begins at 1. |
Returns: true if the column is case sensitive
isCurrency
public boolean isCurrency(int column) throws SQLException
This checks whether the column is a currency value.
Parameters:
columnIndex: | The column index begins at 1. |
Returns: true if the column is a currency value
isDefinitelyWritable
public boolean isDefinitelyWritable(int column) throws SQLException
This checks whether an update of the column will definitely succeed.
Parameters:
columnIndex: | The column index begins at 1. |
Returns: true if the column is definitely writable
isNullable
public int isNullable(int column) throws SQLException
This checks whether the column can be set to SQL NULL.
Parameters:
columnIndex: | The column index begins at 1. |
Returns: columnNoNulls, columnNullable, or columnNullableUnknown
isReadOnly
public boolean isReadOnly(int column) throws SQLException
This checks whether a column is definitely not writable.
Parameters:
columnIndex: | The column index begins at 1. |
Returns: true if the column is read-only
isSearchable
public boolean isSearchable(int column) throws SQLException
This checks whether the column can be used in a SQL WHERE clause.
Parameters:
columnIndex: | The column index begins at 1. |
Returns: true if the column is searchable
isSigned
public boolean isSigned(int column) throws SQLException
This checks whether the column is signed.
Parameters:
columnIndex: | The column index begins at 1. |
Returns: true if the column is signed
isWritable
public boolean isWritable(int column) throws SQLException
This checks whether a column’s value is possibly updatable.
Parameters:
columnIndex: | The column index begins at 1. |
Returns: true if the column is writable