Loop through a record set and use the records.
DECLARE BEGIN FOR c_user IN (SELECT user_id, name FROM user) LOOP dbms_output.put_line('username:' || c_user.name); END LOOP; END;