I\'ve written two stored procedure one with sp_executesql and other doesn\'t have sp_executesql both are executing properly same results, I didn\'t get what is
sp_executesql
With Exec You can't have a place holder in your T-Sql statement string.
sp_executesql gives you the advantage of having a place holder and pass the actual value at runtime