使用输出参数执行存储过程? [英] Execute stored procedure with an Output parameter?

查看:33
本文介绍了使用输出参数执行存储过程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个要测试的存储过程.我正在尝试通过 SQL Management Studio 对其进行测试.为了运行这个测试,我输入 ...

I have a stored procedure that I am trying to test. I am trying to test it through SQL Management Studio. In order to run this test I enter ...

exec my_stored_procedure 'param1Value', 'param2Value'

最后一个参数是一个输出参数.但是,我不知道如何使用输出参数测试存储过程.

The final parameter is an output parameter. However, I do not know how to test a stored procedure with output parameters.

如何运行带有输出参数的存储过程?

How do I run a stored procedure with an output parameter?

推荐答案

最简单的方法是在procedure右击Sql Server 管理工作室(SSMS),

The easy way is to right-click on the procedure in Sql Server Management Studio(SSMS),

select 执行存储过程...

并根据提示为输入参数添加值.

and add values for the input parameters as prompted.

SSMS 然后将生成代码以在新的查询窗口中运行 proc,并为您执行它.您可以研究生成的代码,看看它是如何完成的.

SSMS will then generate the code to run the proc in a new query window, and execute it for you. You can study the generated code to see how it is done.

这篇关于使用输出参数执行存储过程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆