title: MySQL duplicate entry error #1062
body: <p>I'm running a trim query to remove any rows with a trailing "-" in the slug column.  </p>
  
  <p>I have rows with duplicates but that is required right now.</p>
  
  <p>How can I fix the error so that it runs the trim query?</p>
  
  <pre><code>UPDATE terms
  SET slug = TRIM(TRAILING '-' FROM slug);
  </code></pre>
  
  <p>The error: <code>#1062 - Duplicate entry 'system' for key 'slug'</code></p>