CREATE OR REPLACE PACKAGE pkg_test
AS
   TYPE myrctype IS REF CURSOR;
END pkg_test;
/
create procedure abc(p_rc out pkg_test.myrctype)
as
begin
open p_rc for 'select * from table1';
end abc

解决方案 »

  1.   

    CREATE OR REPLACE PACKAGE pkg_test
    AS
       TYPE myrctype IS REF CURSOR;
    END pkg_test;
    /
    create procedure abc(p_rc out pkg_test.myrctype)
    as
    begin
    open p_rc for 'select * from table1';
    end abc
    /
      

  2.   

    CREATE OR REPLACE PACKAGE pkg_test
    AS
       TYPE myrctype IS REF CURSOR;
    END pkg_test;
    /
    create procedure abc(p_rc out pkg_test.myrctype)
    as
    begin
    open p_rc for 'select * from table1';
    end abc
    /
      

  3.   

    再过程里,select 语句要么返回游标要么用select  into
      

  4.   

    create or repalce procedure abc(parameter in varchar2)
    as
    declare 
    -----
    begin--
    -end;
      

  5.   

    我的语句如下:
    create or repalce procedure abc(@bianhao out char(10) )
    as
    begin
    select bianhao into @bianhao from huozhu;
    end
    哪儿有错呀?请指点一下.
      

  6.   

    create or repalce procedure abc(p_bianhao out varchar2)
    as
    begin
    select bianhao into p_bianhao from huozhu;--记录要唯一,否则会报错
    end;
    /