title: MySQL - Query to move part of 1 field's contents to a new field
body: <p>I have a table called cartypes which currently has 2 fields: id &amp; type. I am adding subtype and I want to move the contents after the dash <code>-</code> from the field called type and put those contents into subtype. Disposing of the dash (any extra whitespace too for that matter).  What's the best SQL query for this?</p>
  
  <p>before:</p>
  
  <pre><code>id        type                                      subtype (currently empty)
  ------------------------------------------------------------------------------
  1     legendary muscle car  - steel          
  2     crappy sedan - plasticky interior
  3     legendary sports car  - aluminum bodywork
  4     compact car
  </code></pre>
  
  <p>after:</p>
  
  <pre><code>id        type                     subtype
  ---------------------------------------------------------------
  1     legendary muscle car        steel          
  2     crappy sedan                plasticky interior
  3     legendary sports car        aluminum bodywork
  4     compact car
  </code></pre>