title: How to get different times in the same query session using getdate()?
body: <p>I want a different datetime per GETDATE() statement but it shows the same value.</p>
  
  <pre><code>DECLARE @TimeStampEnd datetime2
  
  SET @TimeStampEnd =  GETDATE()
  SELECT 'Time  ' + CAST (@TimeStampEnd as varchar)
  
  SET @TimeStampEnd =  GETDATE()
  SELECT 'Time  ' + CAST (@TimeStampEnd as varchar)
  </code></pre>