The ResultSetMetaData interface creates an object that can be used to find out about the types and properties of the columns in a ResultSet.
java.sql package
public interface ResultSetMetaData
Tabelle 104 lists the fields in the ResultSetMetaData interface that are
supported by DB2 Everyplace.
Tabelle 104. ResultSetMetaData interface fields
Field type | Field |
---|---|
static int | columnNoNulls The constant indicating that a column does not allow NULL values. |
static int | columnNullable The constant indicating that a column allows NULL values. |
static int | columnNullableUnknown The constant indicating that the nullability of a column's values is unknown. |
Tabelle 105 lists the methods in the ResultSetMetaData interface that
are supported by DB2 Everyplace.
Tabelle 105. ResultSetMetaData interface methods
Method return value type | Method |
---|---|
String | getCatalogName(int column) Gets a column's table's catalog name. DB2 Everyplace always returns "" (not applicable). |
int | getColumnCount() Returns the number of columns in this ResultSet object. |
int | getColumnDisplaySize (int column)Indicates the designated column's normal maximum width in characters. |
String | getColumnLabel(int column) Gets the suggested column title for use in printouts and displays. |
String | getColumnName (int column) Gets the designated column's name. |
int | getColumnType (int column) Gets the designated column's SQL type. |
String | getColumnTypeName(int column) Retrieves a column's database-specific type name. |
int | getPrecision (int column) Gets the designated column's number of decimal digits. |
int | getScale (int column) Gets the designated column's number of digits to the right of the decimal point. |
String | getSchemaName(int column) Gets a column's table's schema name. DB2 Everyplace always returns "" (not applicable). |
int | isNullable (int column) Indicates the nullability of values in the designated column. |
boolean | isWritable(int column) Indicates whether it is possible for a write on the column to succeed. |
Zugehörige Tasks
Zugehörige Referenzen