Function EXECUTE_AND_FETCH executes a parsed SELECT command and fetches one row.
Parameters
c
Cursor id of the cursor for the SELECT command to execute.
exact
If set to TRUE, an exception is thrown if the number of rows in the result set isn't exactly equal to 1. If set to FALSE, no exception is thrown. The default is FALSE. A NO_DATA_FOUND exception is thrown if exact is TRUE and there are no rows in the result set. A TOO_MANY_ROWS exception is thrown if exact is TRUE and more than one row is in the result set.
status
Returns 1 if a row was successfully fetched, 0 if no rows to fetch. If an exception is thrown, no value is returned.
Examples
This stored procedure uses the EXECUTE_AND_FETCH function to retrieve one employee using the employee’s name. An exception is thrown if the employee isn't found or more than one employee has the same name.