类似如下定义,希望对你有用,如果是一个表就好办些,下边以一个表aa为例type myaa is table of aa%rowtype index by binary_integer
vmyaa myaa;
...
open v_cur for select a1,a2,a3,a4 from aa where ...
fetch v_cur into vmyaa
vmyaa myaa;
...
open v_cur for select a1,a2,a3,a4 from aa where ...
fetch v_cur into vmyaa
Cursor myCursor is select * from table_name;
Type my_table is table of table_name.rowtype;
V_mytable my_table;
...
Begin
V_mytable:=my_table();
for i in myCursor Loop
V_mytable(x).field=i.field
...
end Loop;
End;