从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 :)