THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | |
in Search

Browse by Tags

All Tags » bad habits » dynamic SQL   (RSS)
  • Bad Habits to Kick : Using EXEC() instead of sp_executesql

    Today in my T-SQL: Bad Habits to Kick session at SQL Saturday #84 in Kalamazoo, a user asked if SQL Server supported anything like bind variables in Oracle when using dynamic SQL. When using dynamic SQL, you have two choices: EXEC() / EXECUTE(), or sp_executesql. Early on my career, I used EXEC() a lot, because it was much easier. I've since ...
    Posted to Aaron Bertrand (Weblog) by AaronBertrand on September 17, 2011
Powered by Community Server (Commercial Edition), by Telligent Systems
  Privacy Statement