gpt4 book ai didi

oracle - 在 Toad 的输出参数中显示结果

转载 作者:行者123 更新时间:2023-12-04 22:25:26 27 4
gpt4 key购买 nike

我在 Oracle 中有一个存储过程,并且在其中使用了一个 out 参数。
我想知道如何在 Toad 中显示输出..

最佳答案

你只需要声明一个变量来存储值,然后对数据做任何你想做的事情。如果您只想查看输出,dbms_output 可能是最简单的方法:

declare
-- declare variable to store out data in. Make sure datatype is correct
v_out VARCHAR2(50);
begin
-- call procedure, assigning value of out parameter to variable you declared
my_proc(
p_in => 3,
p_out => v_out
);
-- display value now in variable
dbms_output.put_line('Value of p_out: '||v_out);
end;

关于oracle - 在 Toad 的输出参数中显示结果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3546101/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com