title: How to use GETDATE() function in SQL Server to select a column value?
body: <p>How can I use the <code>GETDATE()</code> function in SQL Server to calculate the date exactly one year prior to the day the query is executed? I want to use this value in a query.</p>
  
  <p>E.g :</p>
  
  <pre><code> Select LTRating, RHDate 
   from Accounts and If LTRating ='D' then RHDate = CURRENTDATE()-365
  </code></pre>
  
  <p>I wish to retrieve all <code>LTRating</code> column values where the <code>LTRating</code> value is 'D' and the Date is exactly one year ago.</p>