Useful shortcuts for vi editor

Showing posts with label nested table. Show all posts
Showing posts with label nested table. Show all posts

Friday 13 January 2017

An example of PL/SQL collection for nested table

DECLARE
   TYPE employee IS TABLE OF VARCHAR (5);
   employees   employee:= employee ('A', 'B', 'C', 'D','E');
BEGIN
   FOR i IN employees.FIRST .. employees.LAST
   LOOP
      IF employees (i) = 'C'
      THEN
         DBMS_OUTPUT.PUT_LINE (employees (i));
      END IF;
   END LOOP;
END;