DECLARE
   /* The cursor against the database table. */
   CURSOR company_cur IS SELECT company_id, name FROM company;

   /* The PL/SQL table TYPE and declaration for the primary key. */
   TYPE company_keys_tabtype IS 
      TABLE OF company.company_id%TYPE NOT NULL
      INDEX BY BINARY_INTEGER;
   company_keys_table primary_keys_tabtype;

   /* Sincle PL/SQL table TYPE for two different PL/SQL tables. */
   TYPE date_tabtype IS 
      TABLE OF DATE 
      INDEX BY BINARY_INTEGER;
   incorp_date_table date_tabtype;
   filing_date_table date_tabtype;
   
   /* Variable to keep track of number of rows loaded. */
   num_company_rows BINARY_INTEGER := 0;
BEGIN
   /* The cursor FOR loop */
   FOR company_rec IN company_cur
   LOOP
      /* Increment to the next row in the two, coordinated tables. */
      num_company_rows := num_company_rows + 1;

      /* Set the row values for ID and name. */
      company_keys_table (num_company_rows) := company_rec.company_id;
      incorp_date_tab (num_company_rows) := company_rec.incorp_date;
      filing_date_tab (num_company_rows) := company_rec.filing_date;

   END LOOP;
END;

