实例:

 

/* 测试goto 的用法,
   
  */
  procedure test_loop_go(pi_aab001 in number,
                         po_fhz    out varchar2,
                         po_msg    out varchar2) is
    cursor cur_ac02 is
      select * from ac02 where aab001 = pi_aab001;
  
  begin
    -- aab001 = 511500009511 , aac001 = 1000687490 ,如果是1000687490 这个人,那么就不更新
    for v_cur in cur_ac02 loop
      if v_cur.aac001 = 1000687490 then
        goto the_next;
      elsif v_cur.aac008 = 1 then
        update ac02 a
           set a.aac008 = 6
         where aac001 = v_cur.aac001
           and aae140 = v_cur.aae140;
      end if;
      <<the_next>>
      null;
    end loop;
  end test_loop_go;

  

相关文章:

  • 2021-12-20
  • 2022-01-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-06-19
  • 2021-12-17
  • 2021-12-26
  • 2022-12-23
  • 2021-08-29
  • 2019-12-10
相关资源
相似解决方案