Skip to content

Instantly share code, notes, and snippets.

@joseporiol
Created August 20, 2014 13:14
Show Gist options
  • Save joseporiol/77a56bb69d79a5bae99b to your computer and use it in GitHub Desktop.
Save joseporiol/77a56bb69d79a5bae99b to your computer and use it in GitHub Desktop.
BULCK COLLECT Example all rows and columns from a table
PROCEDURE process_all_rows
IS
TYPE employees_aat
IS TABLE OF employees%ROWTYPE
INDEX BY PLS_INTEGER;
l_employees employees_aat;
BEGIN
SELECT *
BULK COLLECT INTO l_employees
FROM employees;
FOR indx IN 1 .. l_employees.COUNT
LOOP
analyze_compensation
(l_employees(indx));
END LOOP;
END process_all_rows;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment