 
 
 
 
 
 
 
 
 
 
 

cursor_variable
is the cursor variable to be allocated.
For more information on this command, see PL/SQL User's Guide and Reference and Programmer's Guide to the Oracle Precompilers.
Example
This partial example illustrates the use of the ALLOCATE command in a Pro*C embedded SQL program:
EXEC SQL BEGIN DECLARE SECTION; 
	SQL_CURSOR emp_cv; 
	struct{ ... } emp_rec; 
EXEC SQL END DECLARE SECTION; 
EXEC SQL ALLOCATE emp_cursor; 
EXEC SQL EXECUTE 
	BEGIN
 		OPEN :emp_cv FOR SELECT * FROM emp; 
	END; 
END-EXEC; 
for (;;) 
{EXEC SQL FETCH :emp_cv INTO emp_rec; }
![[*]](jump.gif) EXECUTE command
 EXECUTE command ![[*]](jump.gif) FETCH command
 FETCH command ![[*]](jump.gif)
 
 
 
 
 
 
 
 
