There is an alternative way to handle cursors. It is called the cursor FOR loop because of the simplified syntax that is used. With a cursor FOR loop, the process of opening, fetching, and closing is handled implicitly. This makes the blocks much easier to code and maintain.
The cursor FOR loop specifies a sequence of statements to be repeated once for each row returned by the cursor. Use the cursor FOR loop if you need to FETCH and PROCESS every record from a cursor until you want to stop processing and exit the loop.
CURSOR c_student IS
SELECT student_id, last_name, first_name
WHERE student_id < 110;
FOR r_student IN c_student LOOP
INSERT INTO table_log