这只是一个展示的例子。
存储过程A:
Create PROCEDURE InsertNode
@ID nvarchar(64),
@Name nvarchar(64),
@Total int OUTPUT
AS
INSERT INTO [TableA] (ID,Name) VALUES (@ID, @Name)
SELECT @Total = Count(*) FROM TableA
存储过程B:
Create PROCEDURE CallInsertNode
@InputID nvarchar(64),
@InputName nvarchar(64),
@ResultTotal
AS
EXEC InsertNode ...// how can I define the input params(@InputID, @Input Name) and output param (@ResultTotal) for Stored procedure A (like passing parameters)?
谢谢。
答案 0 :(得分:2)
EXEC InsertNode
@Id = @InputId,
@Name = @InputName,
@Total = @ResultTotal OUTPUT