title: SQL Server select (top) two rows into two temp variables
body: <p>I have a query which results in two or more rows (just one column) and I want to catch the first row value into first temp variable and second row value into second temp variable without using multiple times the select top 1 and select top 1 order by desc</p>
  
  <p>Something like this;</p>
  
  <pre><code>Select row1 value into @tempvariable1, row2 value into @tempvariable2 from blah blah
  </code></pre>