title: SQL return select values and set variables at the same time
body: <p>In a SQL Server stored procedure, I retrieve data and set variables at the same time. Can we do that at the same time or we have to write two different select statements?</p>
  
  <pre><code>SELECT 
      username, firstname, lastname, phone
  FROM 
      userTable
  
  SELECT 
      @username = username,
      @firstname = firstname,
      @lastname = lastname,
      @phone = phone
  FROM 
      userTable
  </code></pre>