比如:declare 游标1 is select 字段1,字段2,字段3 from 表1 ; open 游标1 ; loop fatch 游标1 into :变量1,:变量2:,:变量3 ; end loop ; close 游标1
我在存储过程中用的,是这样写的: {strsql in varchar2;} type cur ref cursor; mycursor cur; crecord mycursor%rowtype;begin open mycursor for strsql; loop fetch mycursor into crecord; dbms_output.put_line(crecord.name); end loop;end; 老是出错,说主体不完整什么的,item ignore…… 怎么回事啊?
open 游标1 ;
loop
fatch 游标1 into :变量1,:变量2:,:变量3 ;
end loop ;
close 游标1
{strsql in varchar2;}
type cur ref cursor;
mycursor cur;
crecord mycursor%rowtype;begin
open mycursor for strsql;
loop
fetch mycursor into crecord;
dbms_output.put_line(crecord.name);
end loop;end;
老是出错,说主体不完整什么的,item ignore……
怎么回事啊?