Using SQL Server 2005 and have a stored procedure (not written by me) that I now have to maintain. Its an important query and I want to make some changes to make it easier to maintain without totally rewritting the whole thing. Just exploring some options, so…
How many variables can I have in a stored procedure (is there a limit)?
DECLARE @MyVariable int
According to this article, there is a limit of 2100 parameters that can be passed to a stored proc, so I would assume you could do at least that many variables.
Edit:
Per article: