title: About dynamic SQL in SQL Server, it does not check for permissions when dynamic SQL is used
body: <p>What is dynamic SQL?</p>
  
  <p>I read in a book that when we use dynamic SQL, SQL checks for permissions. But when we do not use it, then there is no check of permissions. Why so?</p>
  
  <p>I made a stored procedure, which updates a table.</p>
  
  <pre><code>create proc steve_SP AS update steveTABLE set eid = 2 where ename = 'henry'
  </code></pre>
  
  <p>OWNER of steve_SP &amp; steveTABLE is STEVE.</p>
  
  <p>I gave permission to a new user, 'Bob', to execute steve_SP, but not any permission on steveTABLE.</p>
  
  <p>Now, when Bob executes the procedure, then it executes successfully.</p>
  
  <p>But, when the code of the procedure is changed (dynamic SQL is used) to code below. </p>
  
  <pre><code>create proc steve_SP AS EXECUTE (update steveTABLE set eid = 2 where ename = 'henry' )
  </code></pre>
  
  <p>And then, Bob executes the procedure. This time the execution of steve_SP FAILS. Why so?</p>