 悬赏园豆:10
                [已解决问题] 
            
                    解决于 2014-02-23 18:14
                悬赏园豆:10
                [已解决问题] 
            
                    解决于 2014-02-23 18:14 
                 
        这是报的错

代码在这里:
declare
 fname varchar2(39);
 iid number;
 urows Users%rowtype;
 cursor cUsers is 
 select * from Users where u_id=1;
 
 begin
 
 open cUsers;
 if cUsers%Notfound then
 dbms_output.put_line('没有找到');
 else
 fetch cUsers into urows;
 for tt in cUsers loop
 dbms_output.put_line('姓名:'||tt.name||'艾迪'||tt.U_id);
 end loop;
 end if;
 close cUsers;
 end;
在使用 FOR 循环时,不能显式的使用 open、colse 和 FETCH 语句,他会自动完成
改为下面这样试试
for tt in cUsers loop
你可以看一下for循环的语法介绍。 oracle的循环是隐式打开游标的