在ORACLE 10G中。

解决方案 »

  1.   

    sqlstr:='select * from mytab';
      open mycursor for sqlstr;
      loop
          fetch mycursor into a,b;--b即为第二列数据
          exit when mycursor%notfound;--没有记录退出
           if b<0 then
          --...
          end if;
      end loop;
      close mycursor;
      

  2.   

    QQ群 38692105 诚招中国IT精英 进群需笔试!~~
      

  3.   

    cursor c is select * from emp;
    for r in c loop;
     result:=r.emp_no;
    end loop;