you can define a storedProcedure like this:
CREATE PROC dbo.myInsert
(
@ID bigint OUTPUT,
@FirstName nvarchar(20)
)
AS
INSERT INTO someNames(FirstName)
VALUES (@FirstName)
SET @ID = SCOPE_IDENTITY()
RETURN
this stored procedure has 2 parameters, @ID that is used to pass a value back to the user, and a parameter that contains firstName of a persone.
but if you mean that you want to create a procedure that get unlimited and not-defined parameters, you can use this:
CREATE PROC dbo.myInsert
(
@myParameters nvarchar(MAX)
)
AS
/*
here you can some codes to split @myParameters
and get an array of values and types
*/
RETURN
and you can call it
myInsert("@ID:bigint,@firstname:nvarchar(20),etc")
|