因為在PL/SQL中並沒有數組
DECLARE
TYPE emp_ssn_array IS TABLE OF NUMBER
INDEX BY BINARY_INTEGER;
best_employees emp_ssn_array;
worst_employees emp_ssn_array;
BEGIN
best_employees(
best_employees(
worst_employees(
worst_employees(
FOR i IN
DBMS_OUTPUT
||
END LOOP;
END;
DECLARE
TYPE emp_type IS RECORD
( emp_id employee_table
emp_name employee_table
emp_gender employee_table
TYPE emp_type_array IS TABLE OF
emp_type INDEX BY BINARY_INTEGER;
emp_rec_array emp_type_array;
emp_rec emp_type;
BEGIN
emp_rec
emp_rec
emp_rec
emp_rec_array(
emp_rec
emp_rec
emp_rec
emp_rec_array(
FOR i IN unt LOOP
DBMS_OUTPUT
||
||
||
END LOOP;
END;
i=
i=
注
emp_type 就好象一個table 中的一條record 一樣
From:http://tw.wingwit.com/Article/program/Oracle/201311/17113.html