peacesells
SSCrazy
Points: 2882
More actions
January 17, 2012 at 4:30 pm
#249357
i don't get it. Why do we need Parameter definition(defined again) in dynamic stored procedure and pass it in the statement when they are already defined as the variables the beginning of the sp.
http://www.codeproject.com/KB/database/Building_Dynamic_SQL.aspx
Ben Teraberry
SSChampion
Points: 11845
January 17, 2012 at 5:22 pm
#1434927
Think of it as a proc within your proc. The main two reasons are for execution plan re-use and security.
└> bt
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply