title: Single rowset in variable
body: <p>I m stuck at this place. I m trying to get a single rowset value in a variable.</p>
  
  <pre><code>DECLARE @last_timestamp as varchar;
  SET @last_timestamp = SELECT MAX(modify_timestamp) FROM dbo.table1
  PRINT @last_timestamp
  </code></pre>
  
  <p>It is returning the below error</p>
  
  <pre><code>Msg 156, Level 15, State 1, Line 2
  Incorrect syntax near the keyword 'SELECT'.
  </code></pre>
  
  <p>Is Cursor the only solution to this problem. Any help would be helpful ?</p>