title: Update all date columns in SQL Server -1 day
body: <p>I want to update my database (SQL Server Express) all the dates for specific ids.</p>
  
  <p>I am displaying the ids I want to.</p>
  
  <pre><code>SELECT TOP (1000) ID, Dates
  FROM tbl_table
  WHERE (id IN (29695, 29700, 29701, 29702, 29703, 29704, 29705, 29706, 29707, 29708, 29709, 29710, 29711, 29712, 29713, 29714, 29715))
  </code></pre>
  
  <p>AND my dates in the database are like this:</p>
  
  <p><a href="https://i.stack.imgur.com/wItux.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wItux.png" alt="enter image description here"></a></p>
  
  <p>Is there any way to update all the date columns with same date - 1 day? </p>
  
  <p>For example: if we have <code>2019-12-20</code>, update it to <code>2019-12-19</code>?</p>
  
  <p>For example if I want to do it in PHP, I would loop through this query and fetch all all dates. After I would remove one day like this:</p>
  
  <pre><code>date('m/d/Y', strtotime($date. ' - 1 days');
  </code></pre>
  
  <p>And create a query to update all the columns based on id. I just want to avoid that. Is there any SQL command that do that?</p>
  
  <p>Thanks</p>