none
sp_executesql vs. sp_sqlexec

Answers

  • sp_sqlexec is not supported any more. It is very old probably SQL Server 6.5 time


    To run a dynamic sql statement use exec or sp_executesql

    Both will execute a sql string created dynamically...however sp_executesql is more likely to reuse query plan so many including Mircosoft favors it in that context.

    • Marked as answer by ElBasha Friday, August 27, 2010 2:27 PM
    Friday, August 27, 2010 2:20 PM

All replies