title: SQL only one cell from column can have X value
body: <p>Is there a way to ensure, when you design a table - SQL, MySQL -, that only one cell from column X is <code>true</code>, the rest being automatically <code>false</code>? When you change the value of a different cell to true, all other cells should automatically become false. A radio button type of exclusivity, but for a column.</p>
  
  <pre><code>mainOfferName | value
  ---------------------
  pizza         | false
  spaghetti     | false
  salad         | true
  stew          | false
  </code></pre>
  
  <p>Upon change of pizza as the main offer you'd get something like this:</p>
  
  <pre><code>mainOfferName | value
  ---------------------
  pizza         | true
  spaghetti     | false
  salad         | false
  stew          | false
  </code></pre>
  
  <p>I can run the query manually and make sure only one value is true at any given time, but I'm curious if I could put a constrain into my table so that I only change the the row/cell I need to <code>true</code> and the DB engine takes care of keeping only that value <code>true</code>.</p>