Hi Gurus,
I am having table like this:
TEST
NO PK
VALUE
And I wrote a test cursor procedure for retrieving values as:
CREATE OR REPLACE
PROCEDURE test_proc_cursor
(
p_no OUT test.no%TYPE,
p_value OUT test.value%TYPE)
AS
CURSOR proc_cursor
IS
SELECT no,value INTO p_no, p_value FROM test;
BEGIN
OPEN proc_cursor;
LOOP
FETCH proc_cursor INTO p_no, p_value;
EXIT
WHEN proc_cursor%NOTFOUND;
dbms_output.put_line(p_no||' '|| p_value);
END LOOP;
CLOSE proc_cursor;
END test_proc_cursor;
But, My question is , I used basic LOOP in the cursor. Can any one write the same cursor logic with WHILE LOOP and FOR LOOP's please
Thanks
Edited by: user10679113 on Jan 22, 2009 7:53 AM
Edited by: user10679113 on Jan 22, 2009 7:54 AM
Edited by: user10679113 on Jan 22, 2009 7:55 AM