title: Which are the best Variables in stored procedures
body: <p>I'm often dealing with some interfaces between two systems with data import or data export. Therefore I'm programming some T-SQL procedures. It's is often necessary to use some variables inside these procedures, to hold some values or single records.</p>
  
  <p>The last time I set up some temp tables e.g. one with name <code>#tmpGlobals</code> and another named <code>#tmpOutput</code>. The names doesn't matter but I eliminated the use of declaring some <code>@MainID int</code> or like that.</p>
  
  <p>Is this a good idea? Is it a performance issue?</p>