如何调用此存储过程?

时间:2011-07-05 04:44:41

标签: oracle plsql

要调用的PL / SQL:

CREATE OR REPLACE PROCEDURE GETQUOTE(
i_SALES_TYPE IN HR.sales_type,
o_DESCRITPION_TYPE OUT HR.description_type
)

TYPE sales_type

CREATE OR REPLACE TYPE "sales_type"     

TYPE description_type

CREATE OR REPLACE TYPE description_type AS TABLE OF VARCHAR2(1000)

1 个答案:

答案 0 :(得分:3)

好的,有一些假设(例如o_DESCRIPTION_TYPE参数在输入时可能为NULL),您的调用代码应该看起来像这样

DECLARE
    in_param  sales_type;
    out_param description_type;
BEGIN
    -- First set up in_param
    in_param := sales_type.someConstructor();
    -- Now make call
    getquote( in_param, out_param );
    -- out_param should now be populated
END;
/