在 oracle 的while 循环语句有没有  break 这样的语句
如果没有怎么实现类似功能
如果有能否给个例子

解决方案 »

  1.   

    loop
                -- BULK COLLECT records
                fetch cur_get_records bulk collect into
                      v_row_id,
                      v_con_def_seq_nbr,
                      v_run_dt,
                      v_store_nbr,
                      v_rx90_cust_fam_nbr,
                      v_rx90_cust_mbr_nbr,
                      v_rx_nbr,
                      v_rx_fill_nbr,
                      v_fill_dt,
                      v_anti_rf_dt,
                      v_ln
                limit v_commit_row_cnt;            i := v_con_def_seq_nbr.first;            if cur_get_records%rowcount > 0 and v_con_def_seq_nbr.exists(i)
                then               -- Delete records from AR_FNL_TBL
                   forall i in v_con_def_seq_nbr.first..v_con_def_seq_nbr.last
                      execute immediate 'delete from ' || v_parm_fnl_tbl  ||
                                        ' where rowid = :1 '
                                        using v_row_id(i);               commit;            end if;            exit when cur_get_records%notfound;         end loop;
      

  2.   

    你的这个 while 并不能解决break  这个
    意思是 跳过当前行下面的代码 继续下一次循环
      

  3.   

    晕,break是指跳出循环若你要跳过当前行下面的代码继续下次循环,那是continuecontinue, Oracle里面没有直接的方式,但是可以用自定义exception解决
    给个链接
    http://blog.csdn.net/wzy0623/archive/2007/07/10/1684344.aspx
      

  4.   

    exit就是退出当前的loop的意思