title: What is the difference between a stored procedure and a view?
body: <p>I am confused about a few points:</p>
  
  <ol>
  <li><p>What is the difference between a stored procedure and a view?</p></li>
  <li><p>When should I use stored procedures, and when should I use views, in SQL Server?</p></li>
  <li><p>Do views allow the creation of dynamic queries where we can pass parameters? </p></li>
  <li><p>Which one is the fastest, and on what basis is one faster than the other?</p></li>
  <li><p>Do views or stored procedures allocate memory permanently?</p></li>
  <li><p>What does it mean if someone says that views create a virtual table, while procedures create a materials table?</p></li>
  </ol>
  
  <p>Please let me know about more points, if there are any.</p>