PL/SQL print out ref cursor returned by a stored procedure

后端 未结 3 1328
谎友^
谎友^ 2020-12-01 06:27

How can I fetch from a ref cursor that is returned from a stored procedure (OUT variable) and print the resulting rows to STDOUT in SQL*PLUS?

ORACLE stored procedure

3条回答
  •  无人及你
    2020-12-01 06:53

    You can use a bind variable at the SQLPlus level to do this. Of course you have little control over the formatting of the output.

    VAR x REFCURSOR;
    EXEC GetGrantListByPI(args, :x);
    PRINT x;
    

提交回复
热议问题