User Guide > Procedures > Executing a Procedure or Parameterized Query > Executing a Stored Procedure
 
Executing a Stored Procedure
This section describes how to use Studio to execute a stored procedure that returns one or more cursors. A stored procedure can contain any number of cursors.
To execute a stored procedure that returns a single cursor
1. Edit the stored procedure as described in Editing a Stored Procedure in an Introspected Data Source.
The following steps apply to the stored procedure described in Designing a Cursor by Example.
2. Save the stored procedure, and click Execute.
Because the stored procedure has a scalar input parameter, the Input Values for <resource> dialog opens. See Executing a Parameterized Query for a description of this window.
3. Supply a value for the scalar parameter and click OK.
The stored procedure is executed and the cursor output is displayed.
To execute a stored procedure that returns two cursors
1. Edit the stored procedure as described in Editing a Stored Procedure in an Introspected Data Source.
2. Save the stored procedure.
3. Click Execute.
You can view the results of cursors in any order. However, due to JDBC driver constraints, all rows of the first-opened cursor need to be buffered before the rows of the next cursor are returned. Therefore, if you are interested in the results of the second cursor and want to improve performance, close the first cursor to disable buffering.