본문 바로가기
Oracle

output변수 로 테이블 복수개 조회

by 캡틴노랑이 2015. 12. 4.
반응형
procedure GetMethod(ProjectCode     in varchar2
                             ,out_Cursor1  out sys_refcursor
                             ,out_Cursor2 out sys_refcursor) is
begin
  open out_Cursor1 for
    select AA
          ,BB
          ,CC
          ,DD
          ,EE
          ,FF
      from t_table1
     where Proj_Cd = ProjectCode
     order by Evlt_Ordr;

  open out_Cursor2 for
    select AA
          ,CC
          ,DD
          ,GG
          ,HH
      from t_table2
     where Proj_Cd = ProjectCode;
  end;
반응형

댓글