getValue method: pass values from SQL result sets to variables
The getValue method of the SQLCursor class assigns a single value from an SQL result set (returned by an SQL query or another stored procedure) to a procedure variable or output parameter using the following syntax:
Syntax
getValue ( col_num , sql_data_type ) ;
col_num
Specifies the desired column of the result set as integer. getValue retrieves the value in the currently fetched record of the column denoted by col_num. 1 denotes the first column of the result set, 2 denotes the second, n denotes the nth.
sql_data_type
Specifies the corresponding SQL data type.
This method returns a Java object that must be cast to the corresponding SQL data type. This example shows how the getValue() method works: