CREATE PROCEDURE dbo.GetOrders @CustomerID int, @StartDate date, @EndDate date as select * from Orders where CustomerID = @CustomerID AND OrderDate BETWEEN @StartDate AND @EndDate GOIf I used name parameters to call the proc, I can pass in the parms in any order.....such as...
EXEC dbo.GetOrders @StartDate = '1-1-1999', @EndDate = '1-31-1999', @CustomerID = 101
However, if I simply pass in values without referring to the parms by name, I have to pass them in, in the original order specified in the procEXEC dbo.GetOrders 101, '1-1-1999', '1-31-1999'