Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have a stored procedure that I am trying to test.

(我有一个要测试的存储过程。)

I am trying to test it through SQL Management Studio.

(我正在尝试通过SQL Management Studio进行测试。)

In order to run this test I enter ...

(为了运行此测试,我输入...)

exec my_stored_procedure 'param1Value', 'param2Value'

The final parameter is an output parameter .

(最终参数是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?

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

  ask by user70192 translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
851 views
Welcome To Ask or Share your Answers For Others

1 Answer

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

(最简单的方法是right-clickprocedureSQL Server Management Studio中 (SSMS))

select execute stored procedure...

(选择execute stored procedure...)

and add values for the input parameters as prompted.

(并根据提示为输入参数添加值。)

SSMS will then generate the code to run the proc in a new query window, and execute it for you.

(然后, SSMS将生成代码以在新的查询窗口中运行proc并为您执行。)

You can study the generated code to see how it is done.

(您可以研究生成的代码以了解其完成方式。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...