SHARE
TWEET

FISCHERPLSQL

a guest Oct 2nd, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. DECLARE
  2.     TYPE emp_table_type IS TABLE OF
  3.         EMPLOYEES%ROWTYPE
  4.         INDEX BY PLS_INTEGER;
  5.  
  6.     emp_table emp_table_type;
  7.     counter   NUMBER(6) := 100;
  8. BEGIN
  9.  
  10.     FOR i IN
  11.         1..4
  12.         LOOP
  13.  
  14.             SELECT *
  15.             INTO emp_table(i)
  16.             FROM EMPLOYEES
  17.             WHERE EMPLOYEE_ID = counter;
  18.             counter := counter + 10;
  19.  
  20.             DBMS_OUTPUT.PUT_LINE(emp_table(i).LAST_NAME);
  21.         END LOOP;
  22.  
  23.  
  24. END;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top