title: How do I drop table variables in SQL-Server? Should I even do this?
body: <p>I have a table variable in a script (not a stored procedure).  Two questions:</p>
  
  <ol>
  <li>How do I drop the table variable?  Drop Table @varName gives an "Incorrect snytax" error.</li>
  <li>Should I always do this?  I hear it's a good practice.  Is it ever really necessary for small scripts like this?</li>
  </ol>
  
  <p>Here's my code:</p>
  
  <pre><code>Declare @projectList table(
      name varchar(40) NOT NULL);
  
  Insert Into @projectList
  Values ('BCR-00021')
  
  Select *
  From @projectList
  
  Drop Table @projectList -- does not work
  </code></pre>