title: Dynamic SQL - EXEC(@SQL) versus EXEC SP_EXECUTESQL(@SQL)
body: <p>What are the real world pros and cons of executing a dynamic SQL command in a stored procedure in SQL Server using</p>
  
  <pre><code>EXEC (@SQL)
  </code></pre>
  
  <p>versus</p>
  
  <pre><code>EXEC SP_EXECUTESQL @SQL
  </code></pre>
  
  <p>?</p>