本帖最后由 u013893505 于 2014-05-29 09:50:36 编辑

解决方案 »

  1.   

    ----------过程
    create or replace procedure p_sel is
    v_tb_student  tb_student %rowtype;
    v_tb_class tb_class %rowtype;
    cursor c_let is select a.* from tb_student a inner join tb_class b on a.tb_student =b.tb_class ;
    cursor c_lea is select b.* from tb_student a inner join dept b on a.tb_student =b.tb_class ;
    begin
      open c_let;
      open c_lea;
      loop
      fetch c_let into v_tb_student ;
      fetch c_lea into v_tb_class ;
      exit when c_let%notfound;
        exit when c_lea%notfound;
      dbms_output.put_line(你要查询的字段);
      end loop;
      close c_let;
     close c_lea;
      end;----------------调用
    begin
      p_sel;
      end;
      

  2.   

    谢了 哥们,第一次用orcal不熟,而且那个工具不太会用