从SQL Server中的另一个存储过程调用存储过程 [英] Call stored procedure from another stored procedure in SQL Server
本文介绍了从SQL Server中的另一个存储过程调用存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Hello All,
在存储过程中调用存储过程的语法是什么?
我的内部存储过程将为外部存储过程返回两个值
然后如何获得这两个值?
-
谢谢
Hello All,
What is the syntax to call stored procedure in stored procedure ?
my inner stored procedure will return two value for outer stored procedure
then how to get that both values ?
--
Thanks
推荐答案
exec storedproc_name @param1, @parm2, etc...
这应该有帮助:
EXECUTE [ ^ ]
问候
Espen Harlinn
This should help:
EXECUTE[^]
Regards
Espen Harlinn
你好,
示例代码供您参考...
Hi,
Sample code for your reference...
//Procedure 1
Create proc stp_Test1
as
begin
select * from table
end
//Procedure 2
create proc stp_Test2
as
begin
// To call the Procedure stp_Test1 in this procedure
// Its return that Procedure output.
exec stp_Test1
end
干杯:)
Cheers :)
这篇关于从SQL Server中的另一个存储过程调用存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文