title: Unused variable detection in SQL Server
body: <p>Is there a way to identify local variables that have been created (or even created and set to a value), but are never used again?  I'm thinking along the lines of when an IDE will underline such variables with a squiggly line.</p>
  
  <p>If this isn't something that can be enabled within SSMS, are there any add-ins that do this?</p>
  
  <p>(Particularly interested in SQL Server 2008 R2, if it matters)</p>
  
  <p>Thanks for the insight.</p>