title: How do I store the select column in a variable?
body: <p>How do I store the select column in a variable?</p>
  <p>I tried this, but it throws me an error &quot;Incorrect syntax&quot;:</p>
  <pre><code>declare @EmpId int
  SELECT  dbo.Employee.Id as @EmpId FROM  dbo.Employee
  </code></pre>