最近做SQL存储过程向Oracle的迁移,以前没接触过Oracle有些语法不知道,麻烦各位给解决一下网上也不好查,
1,SQL中   select * from......,select * from......,select * from......,select * from......,可以直接返回一个数据集,但是在Oracle中不支持,请问怎么解决。
2,Oracle中如何在存储过程中跳转调用到另一个存储过程
分不多略表心意,先谢谢各位了
        

解决方案 »

  1.   

    Oracle中结果集可用游标cursor存取
    如 :
    declare
      cursor my_cursor is select * from ...;
    begin
      open my_cursor;
      loop
           fetch my_cursor;
           ......
      end loop;
      close my_cursor;
    end;
    /
        
      

  2.   

    create   procedure   a   is   
      begin   
              b('Show');   
      exception   
              when   others   then   
                      dbms_output.putline(sqlcode);   
      end;   
        
      create   procedure   b(str   in   varchar2)   is   
      begin   
              dbms_output.putline(str);   
      exception   
              when   others   then   
                      dbms_output.putline(sqlcode);   
      end;