|
return only one row. However, for queries that return more than one row, you must declare an explicit cursor or use a cursor FOR loop. three commands to control the cursor: OPEN, FETCH, and CLOSE. initialize the cursor with the OPEN statement, which identifies the active set. row. You can execute FETCH repeatedly until all rows release the cursor with the CLOSE statement. DECLARE CURSOR c1 IS SELECT ename FROM emp; name1 emp.ename%TYPE; name2 emp.ename%TYPE; name3 emp.ename%TYPE; BEGIN OPEN c1; FETCH c1 INTO name1; -- this fetches first row FETCH c1 INTO name2; -- this fetches second row FETCH c1 INTO name3; -- this fetches third row ... CLOSE c1; END; four what is SGA. The SGA is a shared memory region allocated by the Oracle that contains Data and control information for one Oracle Instance. |