declare
TYPE id_array_type IS TABLE OF VARCHAR2(32) INDEX BY BINARY_INTEGER;
inventoryIds id_array_type;
begin
-- 菜品1 id
inventoryIds(1) := 'a1';
-- 菜品2 id
inventoryIds(2) := 'a2';
for i in 1..inventoryIds.count
loop
dbms_output.put_line('菜品ID='||inventoryIds(i));
end loop;
end;