title: What's the syntax for variables in an MSSQL stored procedure?
body: <p>I have a simple query like this:</p>
  
  <pre><code>select * from mytable where id &gt; 8
  </code></pre>
  
  <p>I want to make the 8 a variable.  There's some syntax like </p>
  
  <pre><code>declare @myvar int
  myvar = 8
  </code></pre>
  
  <p>but I don't know the exact syntax.</p>
  
  <p>What is it?</p>
  
  <p>Thanks!</p>