title: How to check after update on maximum constraints?
body: <p>I have a table for my clients, in which I have their personal informations and a score. This score should be a number between 0 and 1000. I use MySql as DBMS, and I will update client scores by something like this query:</p>
  
  <pre><code>UPDATE client SET score=score+'[insertedScore]' where id='[id]';
  </code></pre>
  
  <p>in which [id] is that client's id and [insertedScore] is the points I should insert to her score. 
  How can I tell mysql to check if after this update the score where more than 1000, change it to 1000?</p>
  
  <p><strong>Note:</strong> Performance is an important issue for me.</p>