int b = 10000;
   for (int i = list.Count - 1; i >= 0; i--)
            {
                if (list[i].a<= b)
                {
                    f=g;
                    break;
                }
            }
  
这是C#代码 请高手帮我转化成 oracle for 循环  谢谢!

解决方案 »

  1.   


    declare
       b number := 100;
       i number;
    begin
       i := b;
       while i >= 0 loop
         dbms_output.put_line(to_char(i)); 
          if i = 90 then
             dbms_output.put_line('yes');
             goto out;
          end if;
          i := i - 1;
       end loop;
    <<out>>
      dbms_output.put_line('end');
    end;
      

  2.   

    伪代码:
    declare
     b number:= 10000;
    for i in reverse 0..list.Count - 1 loop
      if list[i].a<= b then 
         goto goto_this;
      end if;
    end loop;
    <<goto_this>>
    ....
    ....把你list改成oracle里的自定义TYPE吧
      

  3.   


    type reverse is table of varchar2(32767) index by binary_integer;