title: sql query column value = column value - 1
body: <p>I need to -1 from a column on each row of a table and I was wondering if there was a way to do this with SQL rather than writing something in PHP? </p>
  
  <p>On each row there is a "score" column and I need to -1 from the value on each row.</p>
  
  <p>In php I'd use something like</p>
  
  <pre><code>foreach ( $rows as $row ){
       $score = $row-&gt;score - 1; 
       $this-&gt;update_score($score, $row-&gt;id);
  }
  </code></pre>
  
  <p>But with 3000+ records to update, there must be a better way? </p>
  
  <p>Thanks a lot for any help.</p>