Вы можете определить тип записи PL/SQL и соответствующий тип таблицы. Тогда вы можете выпустить SELECT...BULK COLLECT
Чтобы заполнить ваш стол.
declare
type my_record_type is record (testId number, testvalue number);
type my_table_type is table of my_record_type index by binary_integer;
my_table my_table_type;
begin
select x, y bulk collect into my_table from table_foo;
end;