这给了我一个错误@ID
并@Name
说Must declare the scalar variable
,但我不明白为什么它是一个参数。我在这里做错了什么?
CREATE PROCEDURE [dbo].[Ins_eProductFull]
@Name nvarchar(400)
,@ID int
AS
BEGIN
DECLARE @ID2 int
SET NOCOUNT ON;
INSERT INTO Table (Name) VALUES (@Name)
SET @ID2 = SCOPE_IDENTITY()
EXEC dbo.StoredProc1
@ID = @ID,
@Name = @Name,
@ID2 = @ID2
END
GO