“I bought this guide a few days ago to prepare for my interview with Oracle. Many of the questions they asked me were from this guide. I found this book absolutely great!”
Read more comments...
What cursor type do you use to retrieve multiple recordsets?
5,118 Views | (16 votes, avg: 3.44)
ref cursor can be used to retrieve and return the multiple records
There are 3 types 1. OPEN cursor_name 2. FETCH cursor_name INTO var_name [, var_name]… 3. CLOSE cursor_name
Sample example (ONLY USED IN STORED PROC)
DECLARE cur2 CURSOR FOR SELECT i FROM test.t2; OPEN cur2; FETCH cur2 INTO a, b; CLOSE cur2;
Name (required)
Mail (will not be published) (required)
Your Answer
To prove you're a person (not a spam script), type the security text shown in the picture. Click here to regenerate some new text.
ref cursor can be used to retrieve and return the multiple records
There are 3 types
1. OPEN cursor_name
2. FETCH cursor_name INTO var_name [, var_name]…
3. CLOSE cursor_name
Sample example (ONLY USED IN STORED PROC)
DECLARE cur2 CURSOR FOR SELECT i FROM test.t2;
OPEN cur2;
FETCH cur2 INTO a, b;
CLOSE cur2;
Leave an Answer/Comment