A ResultSet object maintains a cursor pointing
to its current row of data. Initially the cursor is positioned
before the first row. The next method moves the
cursor to the next row, and because it returns false
when there are no more rows in the ResultSet object,
it can be used in a while loop to iterate through
the result set.
A default ResultSet object is not updatable and
has a cursor that moves forward only. Thus, you can
iterate through it only once and only from the first row to the
last row. It is possible to
produce ResultSet objects that are scrollable and/or
updatable. The following code fragment, in which con
is a valid Connection object, illustrates how to make
a result set that is scrollable and insensitive to updates by others, and
that is updatable. See ResultSet fields for other
options.
Statement stmt = con.createStatement(
ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATABLE);
ResultSet rs = stmt.executeQuery("SELECT a, b FROM TABLE2");
// rs will be scrollable, will not show changes made by others,
// and will be updatable
The ResultSet interface provides
getter methods (getBoolean, getLong, and so on)
for retrieving column values from the current row.
Values can be retrieved using either the index number of the
column or the name of the column. In general, using the
column index will be more efficient. Columns are numbered from 1.
For maximum portability, result set columns within each row should be
read in left-to-right order, and each column should be read only once.
For the getter methods, a JDBC driver attempts
to convert the underlying data to the Java type specified in the
getter method and returns a suitable Java value. The JDBC specification
has a table showing the allowable mappings from SQL types to Java types
that can be used by the ResultSet getter methods.
Column names used as input to getter methods are case insensitive. When a getter method is called with a column name and several columns have the same name, the value of the first matching column will be returned. The column name option is designed to be used when column names are used in the SQL query that generated the result set. For columns that are NOT explicitly named in the query, it is best to use column numbers. If column names are used, the programmer should take care to guarantee that they uniquely refer to the intended columns, which can be assured with the SQL AS clause.
A set of updater methods were added to this interface in the JDBC 2.0 API (Java 2 SDK, Standard Edition, version 1.2). The comments regarding parameters to the getter methods also apply to parameters to the updater methods.
The updater methods may be used in two ways:
ResultSet object, the cursor can be moved backwards
and forwards, to an absolute position, or to a position
relative to the current row.
The following code fragment updates the NAME column
in the fifth row of the ResultSet object
rs and then uses the method updateRow
to update the data source table from which rs was derived.
rs.absolute(5); // moves the cursor to the fifth row of rs
rs.updateString("NAME", "AINSWORTH"); // updates the
// NAME column of row 5 to be AINSWORTH
rs.updateRow(); // updates the row in the data source
ResultSet object has a special row associated with
it that serves as a staging area for building a row to be inserted.
The following code fragment moves the cursor to the insert row, builds
a three-column row, and inserts it into rs and into
the data source table using the method insertRow.
rs.moveToInsertRow(); // moves cursor to the insert row
rs.updateString(1, "AINSWORTH"); // updates the
// first column of the insert row to be AINSWORTH
rs.updateInt(2,35); // updates the second column to be 35
rs.updateBoolean(3, true); // updates the third column to true
rs.insertRow();
rs.moveToCurrentRow();
A ResultSet object is automatically closed when the
Statement object that
generated it is closed, re-executed, or used
to retrieve the next result from a sequence of multiple results.
The number, types and properties of a ResultSet
object's columns are provided by the ResultSetMetaData
object returned by the ResultSet.getMetaData method.
Statement#executeQuery, Statement#getResultSet, ResultSetMetaData
| Modifier and Type | Field and Description |
|---|---|
| public static final int | CLOSE_CURSORS_AT_COMMIT
The constant indicating that open |
| public static final int | CONCUR_READ_ONLY
The constant indicating the concurrency mode for a
|
| public static final int | CONCUR_UPDATABLE
The constant indicating the concurrency mode for a
|
| public static final int | FETCH_FORWARD
The constant indicating that the rows in a result set will be processed in a forward direction; first-to-last. |
| public static final int | FETCH_REVERSE
The constant indicating that the rows in a result set will be processed in a reverse direction; last-to-first. |
| public static final int | FETCH_UNKNOWN
The constant indicating that the order in which rows in a result set will be processed is unknown. |
| public static final int | HOLD_CURSORS_OVER_COMMIT
The constant indicating that open |
| public static final int | TYPE_FORWARD_ONLY
The constant indicating the type for a |
| public static final int | TYPE_SCROLL_INSENSITIVE
The constant indicating the type for a |
| public static final int | TYPE_SCROLL_SENSITIVE
The constant indicating the type for a |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the cursor is moved to a position in this
ResultSet object;
false if the cursor is before the first row or after the
last rowthe number of the row to which the cursor should move.
A value of zero indicates that the cursor will be positioned
before the first row; a positive number indicates the row number
counting from the beginning of the result set; a negative number
indicates the row number counting from the end of the result set row)Moves the cursor to the given row number in
this |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | close()
Redeclares java. Releases this |
| public void | |
| public int | Returns: the column index of the given column namethe label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel)Maps the given |
| public boolean | Returns: true if the cursor is on a valid row;
false if there are no rows in the result setMoves the cursor to the first row in
this |
| public Array | Returns: anArray object representing the SQL
ARRAY value in the specified columnthe first column is 1, the second is 2, ... columnIndex)Retrieves the value of the designated column in the current row
of this |
| public Array | Returns: anArray object representing the SQL ARRAY value in
the specified columnthe label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel)Retrieves the value of the designated column in the current row
of this |
| public InputStream | Returns: a Java input stream that delivers the database column value as a stream of one-byte ASCII characters; if the value is SQLNULL, the
value returned is nullthe first column is 1, the second is 2, ... columnIndex)Retrieves the value of the designated column in the current row
of this |
| public InputStream | Returns: a Java input stream that delivers the database column value as a stream of one-byte ASCII characters. If the value is SQLNULL,
the value returned is null.the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel)Retrieves the value of the designated column in the current row
of this |
| public BigDecimal | Returns: the column value; if the value is SQLNULL, the
value returned is nullthe first column is 1, the second is 2, ... columnIndex, int the number of digits to the right of the decimal point scale)
Deprecated
since 1.2. Use
getBigDecimal(int columnIndex)
or getBigDecimal(String columnLabel)
Retrieves the value of the designated column in the current row
of this |
| public BigDecimal | Returns: the column value; if the value is SQLNULL, the
value returned is nullthe label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, int the number of digits to the right of the decimal point scale)
Deprecated
since 1.2. Use
getBigDecimal(int columnIndex)
or getBigDecimal(String columnLabel)
Retrieves the value of the designated column in the current row
of this |
| public BigDecimal | Returns: the column value (full precision); if the value is SQLNULL, the value returned is
null in the Java programming language.the first column is 1, the second is 2, ... columnIndex)Retrieves the value of the designated column in the current row
of this |
| public BigDecimal | Returns: the column value (full precision); if the value is SQLNULL, the value returned is
null in the Java programming language.the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel)Retrieves the value of the designated column in the current row
of this |
| public InputStream | Returns: a Java input stream that delivers the database column value as a stream of uninterpreted bytes; if the value is SQLNULL, the value returned is
nullthe first column is 1, the second is 2, ... columnIndex)Retrieves the value of the designated column in the current row
of this |
| public InputStream | Returns: a Java input stream that delivers the database column value as a stream of uninterpreted bytes; if the value is SQLNULL, the result is nullthe label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel)Retrieves the value of the designated column in the current row
of this |
| public Blob | Returns: aBlob object representing the SQL
BLOB value in the specified columnthe first column is 1, the second is 2, ... columnIndex)Retrieves the value of the designated column in the current row
of this |
| public Blob | Returns: aBlob object representing the SQL BLOB
value in the specified columnthe label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel)Retrieves the value of the designated column in the current row
of this |
| public boolean | Returns: the column value; if the value is SQLNULL, the
value returned is falsethe first column is 1, the second is 2, ... columnIndex)Retrieves the value of the designated column in the current row
of this |
| public boolean | Returns: the column value; if the value is SQLNULL, the
value returned is falsethe label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel)Retrieves the value of the designated column in the current row
of this |
| public byte | Returns: the column value; if the value is SQLNULL, the
value returned is 0the first column is 1, the second is 2, ... columnIndex)Retrieves the value of the designated column in the current row
of this |
| public byte | Returns: the column value; if the value is SQLNULL, the
value returned is 0the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel)Retrieves the value of the designated column in the current row
of this |
| public byte[] | Returns: the column value; if the value is SQLNULL, the
value returned is nullthe first column is 1, the second is 2, ... columnIndex)Retrieves the value of the designated column in the current row
of this |
| public byte[] | Returns: the column value; if the value is SQLNULL, the
value returned is nullthe label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel)Retrieves the value of the designated column in the current row
of this |
| public Reader | Returns: ajava.io.Reader object that contains the column
value; if the value is SQL NULL, the value returned is
null in the Java programming language.the first column is 1, the second is 2, ... columnIndex)Retrieves the value of the designated column in the current row
of this |
| public Reader | Returns: ajava.io.Reader object that contains the column
value; if the value is SQL NULL, the value returned is
null in the Java programming languagethe label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel)Retrieves the value of the designated column in the current row
of this |
| public Clob | Returns: aClob object representing the SQL
CLOB value in the specified columnthe first column is 1, the second is 2, ... columnIndex)Retrieves the value of the designated column in the current row
of this |
| public Clob | Returns: aClob object representing the SQL CLOB
value in the specified columnthe label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel)Retrieves the value of the designated column in the current row
of this |
| public int | Returns: the concurrency type, eitherResultSet.CONCUR_READ_ONLY
or ResultSet.CONCUR_UPDATABLERetrieves the concurrency mode of this |
| public String | Returns: the SQL name for thisResultSet object's cursorRetrieves the name of the SQL cursor used by this |
| public Date | Returns: the column value; if the value is SQLNULL, the
value returned is nullthe first column is 1, the second is 2, ... columnIndex)Retrieves the value of the designated column in the current row
of this |
| public Date | Returns: the column value; if the value is SQLNULL, the
value returned is nullthe label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel)Retrieves the value of the designated column in the current row
of this |
| public Date | Returns: the column value as ajava.sql.Date object;
if the value is SQL NULL,
the value returned is null in the Java programming languagethe first column is 1, the second is 2, ... columnIndex, Calendar the cal)java.util.Calendar object
to use in constructing the dateRetrieves the value of the designated column in the current row
of this |
| public Date | Returns: the column value as ajava.sql.Date object;
if the value is SQL NULL,
the value returned is null in the Java programming languagethe label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, Calendar the cal)java.util.Calendar object
to use in constructing the dateRetrieves the value of the designated column in the current row
of this |
| public double | Returns: the column value; if the value is SQLNULL, the
value returned is 0the first column is 1, the second is 2, ... columnIndex)Retrieves the value of the designated column in the current row
of this |
| public double | Returns: the column value; if the value is SQLNULL, the
value returned is 0the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel)Retrieves the value of the designated column in the current row
of this |
| public int | Returns: the current fetch direction for thisResultSet objectRetrieves the fetch direction for this
|
| public int | Returns: the current fetch size for thisResultSet objectRetrieves the fetch size for this
|
| public float | Returns: the column value; if the value is SQLNULL, the
value returned is 0the first column is 1, the second is 2, ... columnIndex)Retrieves the value of the designated column in the current row
of this |
| public float | Returns: the column value; if the value is SQLNULL, the
value returned is 0the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel)Retrieves the value of the designated column in the current row
of this |
| public int | Returns: eitherResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMITRetrieves the holdability of this |
| public int | Returns: the column value; if the value is SQLNULL, the
value returned is 0the first column is 1, the second is 2, ... columnIndex)Retrieves the value of the designated column in the current row
of this |
| public int | Returns: the column value; if the value is SQLNULL, the
value returned is 0the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel)Retrieves the value of the designated column in the current row
of this |
| public long | Returns: the column value; if the value is SQLNULL, the
value returned is 0the first column is 1, the second is 2, ... columnIndex)Retrieves the value of the designated column in the current row
of this |
| public long | Returns: the column value; if the value is SQLNULL, the
value returned is 0the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel)Retrieves the value of the designated column in the current row
of this |
| public ResultSetMetaData | Returns: the description of thisResultSet object's columnsRetrieves the number, types and properties of
this |
| public Reader | Returns: ajava.io.Reader object that contains the column
value; if the value is SQL NULL, the value returned is
null in the Java programming language.the first column is 1, the second is 2, ... columnIndex)Retrieves the value of the designated column in the current row
of this |
| public Reader | Returns: ajava.io.Reader object that contains the column
value; if the value is SQL NULL, the value returned is
null in the Java programming languagethe label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel)Retrieves the value of the designated column in the current row
of this |
| public NClob | Returns: aNClob object representing the SQL
NCLOB value in the specified columnthe first column is 1, the second is 2, ... columnIndex)Retrieves the value of the designated column in the current row
of this |
| public NClob | Returns: aNClob object representing the SQL NCLOB
value in the specified columnthe label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel)Retrieves the value of the designated column in the current row
of this |
| public String | Returns: the column value; if the value is SQLNULL, the
value returned is nullthe first column is 1, the second is 2, ... columnIndex)Retrieves the value of the designated column in the current row
of this |
| public String | Returns: the column value; if the value is SQLNULL, the
value returned is nullthe label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel)Retrieves the value of the designated column in the current row
of this |
| public Object | Returns: ajava.lang.Object holding the column valuethe first column is 1, the second is 2, ... columnIndex)Gets the value of the designated column in the current row
of this |
| public Object | Returns: ajava.lang.Object holding the column valuethe label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel)Gets the value of the designated column in the current row
of this |
| public Object | Returns: anObject in the Java programming language
representing the SQL valuethe first column is 1, the second is 2, ... columnIndex, Map<String, Class<?>> a map)java.util.Map object that contains the mapping
from SQL type names to classes in the Java programming languageRetrieves the value of the designated column in the current row
of this |
| public Object | Returns: anObject representing the SQL value in the
specified columnthe label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, Map<String, Class<?>> a map)java.util.Map object that contains the mapping
from SQL type names to classes in the Java programming languageRetrieves the value of the designated column in the current row
of this |
| public < the type of the class modeled by this Class object T> T | Returns: an instance oftype holding the column valuethe first column is 1, the second is 2, ... columnIndex, Class<T> Class representing the Java data type to convert the designated
column to. type)Retrieves the value of the designated column in the current row
of this |
| public < the type of the class modeled by this Class object T> T | Returns: an instance oftype holding the column valuethe label for the column specified with the SQL AS clause.
If the SQL AS clause was not specified, then the label is the name
of the column columnLabel, Class<T> Class representing the Java data type to convert the designated
column to. type)Retrieves the value of the designated column in the current row
of this |
| public Ref | Returns: aRef object representing an SQL REF
valuethe first column is 1, the second is 2, ... columnIndex)Retrieves the value of the designated column in the current row
of this |
| public Ref | Returns: aRef object representing the SQL REF
value in the specified columnthe label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel)Retrieves the value of the designated column in the current row
of this |
| public int | Returns: the current row number;0 if there is no current rowRetrieves the current row number. |
| public RowId | Returns: the column value; if the value is a SQLNULL the
value returned is nullthe first column is 1, the second 2, ... columnIndex)Retrieves the value of the designated column in the current row of this
|
| public RowId | Returns: the column value ; if the value is a SQLNULL the
value returned is nullthe label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel)Retrieves the value of the designated column in the current row of this
|
| public short | Returns: the column value; if the value is SQLNULL, the
value returned is 0the first column is 1, the second is 2, ... columnIndex)Retrieves the value of the designated column in the current row
of this |
| public short | Returns: the column value; if the value is SQLNULL, the
value returned is 0the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel)Retrieves the value of the designated column in the current row
of this |
| public SQLXML | Returns: aSQLXML object that maps an SQL XML valuethe first column is 1, the second is 2, ... columnIndex)Retrieves the value of the designated column in the current row of
this |
| public SQLXML | Returns: aSQLXML object that maps an SQL XML valuethe label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel)Retrieves the value of the designated column in the current row of
this |
| public Statement | Returns: theStatement object that produced
this ResultSet object or null
if the result set was produced some other wayRetrieves the |
| public String | Returns: the column value; if the value is SQLNULL, the
value returned is nullthe first column is 1, the second is 2, ... columnIndex)Retrieves the value of the designated column in the current row
of this |
| public String | Returns: the column value; if the value is SQLNULL, the
value returned is nullthe label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel)Retrieves the value of the designated column in the current row
of this |
| public Time | Returns: the column value; if the value is SQLNULL, the
value returned is nullthe first column is 1, the second is 2, ... columnIndex)Retrieves the value of the designated column in the current row
of this |
| public Time | Returns: the column value; if the value is SQLNULL,
the value returned is nullthe label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel)Retrieves the value of the designated column in the current row
of this |
| public Time | Returns: the column value as ajava.sql.Time object;
if the value is SQL NULL,
the value returned is null in the Java programming languagethe first column is 1, the second is 2, ... columnIndex, Calendar the cal)java.util.Calendar object
to use in constructing the timeRetrieves the value of the designated column in the current row
of this |
| public Time | Returns: the column value as ajava.sql.Time object;
if the value is SQL NULL,
the value returned is null in the Java programming languagethe label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, Calendar the cal)java.util.Calendar object
to use in constructing the timeRetrieves the value of the designated column in the current row
of this |
| public Timestamp | Returns: the column value; if the value is SQLNULL, the
value returned is nullthe first column is 1, the second is 2, ... columnIndex)Retrieves the value of the designated column in the current row
of this |
| public Timestamp | Returns: the column value; if the value is SQLNULL, the
value returned is nullthe label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel)Retrieves the value of the designated column in the current row
of this |
| public Timestamp | Returns: the column value as ajava.sql.Timestamp object;
if the value is SQL NULL,
the value returned is null in the Java programming languagethe first column is 1, the second is 2, ... columnIndex, Calendar the cal)java.util.Calendar object
to use in constructing the timestampRetrieves the value of the designated column in the current row
of this |
| public Timestamp | Returns: the column value as ajava.sql.Timestamp object;
if the value is SQL NULL,
the value returned is null in the Java programming languagethe label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, Calendar the cal)java.util.Calendar object
to use in constructing the dateRetrieves the value of the designated column in the current row
of this |
| public int | Returns: ResultSet.TYPE_FORWARD_ONLY,
ResultSet.TYPE_SCROLL_INSENSITIVE,
or ResultSet.TYPE_SCROLL_SENSITIVERetrieves the type of this |
| public InputStream | Returns: a Java input stream that delivers the database column value as a stream of two-byte Unicode characters; if the value is SQLNULL, the value returned is
nullthe first column is 1, the second is 2, ... columnIndex)
Deprecated
since 1.2. use
getCharacterStream in place of
getUnicodeStream
Retrieves the value of the designated column in the current row
of this |
| public InputStream | Returns: a Java input stream that delivers the database column value as a stream of two-byte Unicode characters. If the value is SQLNULL, the value returned
is null.the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel)
Deprecated
since 1.2. use
getCharacterStream instead
Retrieves the value of the designated column in the current row
of this |
| public URL | Returns: the column value as ajava.net.URL object;
if the value is SQL NULL,
the value returned is null in the Java programming languagethe index of the column 1 is the first, 2 is the second,... columnIndex)Retrieves the value of the designated column in the current row
of this |
| public URL | Returns: the column value as ajava.net.URL object;
if the value is SQL NULL,
the value returned is null in the Java programming languagethe label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel)Retrieves the value of the designated column in the current row
of this |
| public SQLWarning | Returns: the firstSQLWarning object reported or
null if there are noneRetrieves the first warning reported by calls on this
|
| public void | |
| public boolean | Returns: true if the cursor is after the last row;
false if the cursor is at any other position or the
result set contains no rowsRetrieves whether the cursor is after the last row in
this |
| public boolean | Returns: true if the cursor is before the first row;
false if the cursor is at any other position or the
result set contains no rowsRetrieves whether the cursor is before the first row in
this |
| public boolean | Returns: true if thisResultSet object is closed; false if it is still openRetrieves whether this |
| public boolean | Returns: true if the cursor is on the first row;
false otherwiseRetrieves whether the cursor is on the first row of
this |
| public boolean | Returns: true if the cursor is on the last row;
false otherwiseRetrieves whether the cursor is on the last row of
this Note Calling the method |
| public boolean | Returns: true if the cursor is on a valid row;
false if there are no rows in the result setMoves the cursor to the last row in
this |
| public void | |
| public void | |
| public boolean | Returns: true if the new current row is valid;
false if there are no more rowsMoves the cursor forward one row from its current position. |
| public boolean | Returns: true if the cursor is now positioned on a valid row;
false if the cursor is positioned before the first rowMoves the cursor to the previous row in this
|
| public void | |
| public boolean | Returns: true if the cursor is on a row;
false otherwisean rows)int specifying the number of rows to
move from the current row; a positive number moves the cursor
forward; a negative number moves the cursor backwardMoves the cursor a relative number of rows, either positive or negative. |
| public boolean | Returns: true if the current row is detected to
have been deleted by the owner or another; false otherwiseRetrieves whether a row has been deleted. |
| public boolean | Returns: true if the current row is detected to
have been inserted; false otherwiseRetrieves whether the current row has had an insertion. |
| public boolean | Returns: true if the current row is detected to
have been visibly updated by the owner or another; false otherwiseRetrieves whether the current row has been updated. |
| public void | setFetchDirection(int
an direction)int specifying the suggested
fetch direction; one of ResultSet.FETCH_FORWARD,
ResultSet.FETCH_REVERSE, or
ResultSet.FETCH_UNKNOWNGives a hint as to the direction in which the rows in this
|
| public void | setFetchSize(int
the number of rows to fetch rows)Gives the JDBC driver a hint as to the number of rows that should
be fetched from the database when more rows are needed for this
|
| public void | updateArray(int
the first column is 1, the second is 2, ... columnIndex, Array the new column value x)Updates the designated column with a |
| public void | updateArray(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, Array the new column value x)Updates the designated column with a |
| public void | updateAsciiStream(int
the first column is 1, the second is 2, ... columnIndex, InputStream the new column value x, int the length of the stream length)Updates the designated column with an ascii stream value, which will have the specified number of bytes. |
| public void | updateAsciiStream(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, InputStream the new column value x, int the length of the stream length)Updates the designated column with an ascii stream value, which will have the specified number of bytes. |
| public void | updateAsciiStream(int
the first column is 1, the second is 2, ... columnIndex, InputStream the new column value x, long the length of the stream length)Updates the designated column with an ascii stream value, which will have the specified number of bytes. |
| public void | updateAsciiStream(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, InputStream the new column value x, long the length of the stream length)Updates the designated column with an ascii stream value, which will have the specified number of bytes. |
| public void | updateAsciiStream(int
the first column is 1, the second is 2, ... columnIndex, InputStream the new column value x)Updates the designated column with an ascii stream value. |
| public void | updateAsciiStream(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, InputStream the new column value x)Updates the designated column with an ascii stream value. |
| public void | updateBigDecimal(int
the first column is 1, the second is 2, ... columnIndex, BigDecimal the new column value x)Updates the designated column with a |
| public void | updateBigDecimal(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, BigDecimal the new column value x)Updates the designated column with a |
| public void | updateBinaryStream(int
the first column is 1, the second is 2, ... columnIndex, InputStream the new column value x, int the length of the stream length)Updates the designated column with a binary stream value, which will have the specified number of bytes. |
| public void | updateBinaryStream(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, InputStream the new column value x, int the length of the stream length)Updates the designated column with a binary stream value, which will have the specified number of bytes. |
| public void | updateBinaryStream(int
the first column is 1, the second is 2, ... columnIndex, InputStream the new column value x, long the length of the stream length)Updates the designated column with a binary stream value, which will have the specified number of bytes. |
| public void | updateBinaryStream(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, InputStream the new column value x, long the length of the stream length)Updates the designated column with a binary stream value, which will have the specified number of bytes. |
| public void | updateBinaryStream(int
the first column is 1, the second is 2, ... columnIndex, InputStream the new column value x)Updates the designated column with a binary stream value. |
| public void | updateBinaryStream(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, InputStream the new column value x)Updates the designated column with a binary stream value. |
| public void | updateBlob(int
the first column is 1, the second is 2, ... columnIndex, Blob the new column value x)Updates the designated column with a |
| public void | updateBlob(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, Blob the new column value x)Updates the designated column with a |
| public void | updateBlob(int
the first column is 1, the second is 2, ... columnIndex, InputStream An object that contains the data to set the parameter
value to. inputStream, long the number of bytes in the parameter data. length)Updates the designated column using the given input stream, which will have the specified number of bytes. |
| public void | updateBlob(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, InputStream An object that contains the data to set the parameter
value to. inputStream, long the number of bytes in the parameter data. length)Updates the designated column using the given input stream, which will have the specified number of bytes. |
| public void | updateBlob(int
the first column is 1, the second is 2, ... columnIndex, InputStream An object that contains the data to set the parameter
value to. inputStream)Updates the designated column using the given input stream. |
| public void | updateBlob(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, InputStream An object that contains the data to set the parameter
value to. inputStream)Updates the designated column using the given input stream. |
| public void | updateBoolean(int
the first column is 1, the second is 2, ... columnIndex, boolean the new column value x)Updates the designated column with a |
| public void | updateBoolean(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, boolean the new column value x)Updates the designated column with a |
| public void | updateByte(int
the first column is 1, the second is 2, ... columnIndex, byte the new column value x)Updates the designated column with a |
| public void | updateByte(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, byte the new column value x)Updates the designated column with a |
| public void | updateBytes(int
the first column is 1, the second is 2, ... columnIndex, byte[] the new column value x)Updates the designated column with a |
| public void | updateBytes(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, byte[] the new column value x)Updates the designated column with a byte array value. |
| public void | updateCharacterStream(int
the first column is 1, the second is 2, ... columnIndex, Reader the new column value x, int the length of the stream length)Updates the designated column with a character stream value, which will have the specified number of bytes. |
| public void | updateCharacterStream(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, Reader the reader, int java.io.Reader object containing
the new column valuethe length of the stream length)Updates the designated column with a character stream value, which will have the specified number of bytes. |
| public void | updateCharacterStream(int
the first column is 1, the second is 2, ... columnIndex, Reader the new column value x, long the length of the stream length)Updates the designated column with a character stream value, which will have the specified number of bytes. |
| public void | updateCharacterStream(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, Reader the reader, long java.io.Reader object containing
the new column valuethe length of the stream length)Updates the designated column with a character stream value, which will have the specified number of bytes. |
| public void | updateCharacterStream(int
the first column is 1, the second is 2, ... columnIndex, Reader the new column value x)Updates the designated column with a character stream value. |
| public void | updateCharacterStream(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, Reader the reader)java.io.Reader object containing
the new column valueUpdates the designated column with a character stream value. |
| public void | updateClob(int
the first column is 1, the second is 2, ... columnIndex, Clob the new column value x)Updates the designated column with a |
| public void | updateClob(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, Clob the new column value x)Updates the designated column with a |
| public void | updateClob(int
the first column is 1, the second is 2, ... columnIndex, Reader An object that contains the data to set the parameter value to. reader, long the number of characters in the parameter data. length)Updates the designated column using the given |
| public void | updateClob(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, Reader An object that contains the data to set the parameter value to. reader, long the number of characters in the parameter data. length)Updates the designated column using the given |
| public void | updateClob(int
the first column is 1, the second is 2, ... columnIndex, Reader An object that contains the data to set the parameter value to. reader)Updates the designated column using the given |
| public void | updateClob(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, Reader An object that contains the data to set the parameter value to. reader)Updates the designated column using the given |
| public void | updateDate(int
the first column is 1, the second is 2, ... columnIndex, Date the new column value x)Updates the designated column with a |
| public void | updateDate(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, Date the new column value x)Updates the designated column with a |
| public void | updateDouble(int
the first column is 1, the second is 2, ... columnIndex, double the new column value x)Updates the designated column with a |
| public void | updateDouble(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, double the new column value x)Updates the designated column with a |
| public void | updateFloat(int
the first column is 1, the second is 2, ... columnIndex, float the new column value x)Updates the designated column with a |
| public void | updateFloat(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, float the new column value x)Updates the designated column with a |
| public void | updateInt(int
the first column is 1, the second is 2, ... columnIndex, int the new column value x)Updates the designated column with an |
| public void | |
| public void | updateLong(int
the first column is 1, the second is 2, ... columnIndex, long the new column value x)Updates the designated column with a |
| public void | updateLong(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, long the new column value x)Updates the designated column with a |
| public void | updateNCharacterStream(int
the first column is 1, the second is 2, ... columnIndex, Reader the new column value x, long the length of the stream length)Updates the designated column with a character stream value, which will have the specified number of bytes. |
| public void | updateNCharacterStream(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, Reader the reader, long java.io.Reader object containing
the new column valuethe length of the stream length)Updates the designated column with a character stream value, which will have the specified number of bytes. |
| public void | updateNCharacterStream(int
the first column is 1, the second is 2, ... columnIndex, Reader the new column value x)Updates the designated column with a character stream value. |
| public void | updateNCharacterStream(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, Reader the reader)java.io.Reader object containing
the new column valueUpdates the designated column with a character stream value. |
| public void | updateNClob(int
the first column is 1, the second 2, ... columnIndex, NClob the value for the column to be updated nClob)Updates the designated column with a |
| public void | updateNClob(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, NClob the value for the column to be updated nClob)Updates the designated column with a |
| public void | updateNClob(int
the first column is 1, the second 2, ... columnIndex, Reader An object that contains the data to set the parameter value to. reader, long the number of characters in the parameter data. length)Updates the designated column using the given |
| public void | updateNClob(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, Reader An object that contains the data to set the parameter value to. reader, long the number of characters in the parameter data. length)Updates the designated column using the given |
| public void | updateNClob(int
the first column is 1, the second 2, ... columnIndex, Reader An object that contains the data to set the parameter value to. reader)Updates the designated column using the given |
| public void | updateNClob(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, Reader An object that contains the data to set the parameter value to. reader)Updates the designated column using the given |
| public void | updateNString(int
the first column is 1, the second 2, ... columnIndex, String the value for the column to be updated nString)Updates the designated column with a |
| public void | updateNString(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, String the value for the column to be updated nString)Updates the designated column with a |
| public void | updateNull(int
the first column is 1, the second is 2, ... columnIndex)Updates the designated column with a |
| public void | updateNull(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel)Updates the designated column with a |
| public void | updateObject(int
the first column is 1, the second is 2, ... columnIndex, Object the new column value x, int for an object of scaleOrLength)java.math.BigDecimal ,
this is the number of digits after the decimal point. For
Java Object types InputStream and Reader,
this is the length
of the data in the stream or reader. For all other types,
this value will be ignored.Updates the designated column with an |
| public void | updateObject(int
the first column is 1, the second is 2, ... columnIndex, Object the new column value x)Updates the designated column with an |
| public void | updateObject(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, Object the new column value x, int for an object of scaleOrLength)java.math.BigDecimal ,
this is the number of digits after the decimal point. For
Java Object types InputStream and Reader,
this is the length
of the data in the stream or reader. For all other types,
this value will be ignored.Updates the designated column with an |
| public void | updateObject(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, Object the new column value x)Updates the designated column with an |
| public default void | updateObject(int
the first column is 1, the second is 2, ... columnIndex, Object the new column value x, SQLType the SQL type to be sent to the database targetSqlType, int for an object of scaleOrLength)java.math.BigDecimal ,
this is the number of digits after the decimal point. For
Java Object types InputStream and Reader,
this is the length
of the data in the stream or reader. For all other types,
this value will be ignored.Updates the designated column with an |
| public default void | updateObject(String
the label for the column specified with the SQL AS
clause. If the SQL AS clause was not specified, then the label is
the name of the column columnLabel, Object the new column value x, SQLType the SQL type to be sent to the database targetSqlType, int for an object of scaleOrLength)java.math.BigDecimal ,
this is the number of digits after the decimal point. For
Java Object types InputStream and Reader,
this is the length
of the data in the stream or reader. For all other types,
this value will be ignored.Updates the designated column with an |
| public default void | updateObject(int
the first column is 1, the second is 2, ... columnIndex, Object the new column value x, SQLType the SQL type to be sent to the database targetSqlType)Updates the designated column with an |
| public default void | updateObject(String
the label for the column specified with the SQL AS
clause. If the SQL AS clause was not specified, then the label is
the name of the column columnLabel, Object the new column value x, SQLType the SQL type to be sent to the database targetSqlType)Updates the designated column with an |
| public void | |
| public void | |
| public void | updateRow()
Updates the underlying database with the new contents of the
current row of this |
| public void | updateRowId(int
the first column is 1, the second 2, ... columnIndex, RowId the column value x)Updates the designated column with a |
| public void | updateRowId(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, RowId the column value x)Updates the designated column with a |
| public void | updateShort(int
the first column is 1, the second is 2, ... columnIndex, short the new column value x)Updates the designated column with a |
| public void | updateShort(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, short the new column value x)Updates the designated column with a |
| public void | updateSQLXML(int
the first column is 1, the second 2, ... columnIndex, SQLXML the value for the column to be updated xmlObject)Updates the designated column with a |
| public void | updateSQLXML(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, SQLXML the column value xmlObject)Updates the designated column with a |
| public void | updateString(int
the first column is 1, the second is 2, ... columnIndex, String the new column value x)Updates the designated column with a |
| public void | updateString(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, String the new column value x)Updates the designated column with a |
| public void | updateTime(int
the first column is 1, the second is 2, ... columnIndex, Time the new column value x)Updates the designated column with a |
| public void | updateTime(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, Time the new column value x)Updates the designated column with a |
| public void | updateTimestamp(int
the first column is 1, the second is 2, ... columnIndex, Timestamp the new column value x)Updates the designated column with a |
| public void | updateTimestamp(String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column columnLabel, Timestamp the new column value x)Updates the designated column with a |
| public boolean | Returns: true if the last column value read was SQL
NULL and false otherwiseReports whether
the last column read had a value of SQL |