title: Mysql: Swap data for different rows
body: <p>Suppose a table <code>fruits</code> that looks like this:</p>
  
  <pre><code>------------------------------------------
  | id |    name    |   color   | calories |
  ------------------------------------------
  | 1  | apple      | red       | 20       |
  | 2  | orange     | orange    | 10       |
  | 3  | grapes     | green     | 5        |
  | 4  | bananas    | yellow    | 15       |
  | 5  | plum       | purple    | 25       |
  ------------------------------------------
  </code></pre>
  
  <p>How can I <strong>swap</strong> the values of a row, with another, leaving the id number intact?</p>
  
  <p>Example: </p>
  
  <pre><code>SWAP ROW WITH ID "5" WITH ROW WITH ID "2"
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>------------------------------------------
  | id |    name    |   color   | calories |
  ------------------------------------------
  | 1  | apple      | red       | 20       |
  | 2  | plum       | purple    | 25       |
  | 3  | grapes     | green     | 5        |
  | 4  | bananas    | yellow    | 15       |
  | 5  | orange     | orange    | 10       |
  ------------------------------------------
  </code></pre>
  
  <p>Note that all the values are intact except for the id. 
  I need to do this with a really large list of values, so I need a one-liner, or at most, something that doesn't require the creation of temporary tables, and things like that.</p>
  
  <p>Note: id is unique</p>
  
  <p>Thank you</p>