title: How to update a value with substring of current value using SQL
body: <p>In my location table, some city names contain zip codes. I want to remove the zip code. Zip Codes (if any) are present at right side of the city name. (I am using MySQL)</p>
  
  <p>I can select all such cities with this query:</p>
  
  <pre><code>SELECT name FROM location where name REGEXP '[0-9]$';
  </code></pre>
  
  <p>It displays:</p>
  
  <pre><code>Lahore-54000
  Karachi-75000
  Islamabad-87544
  </code></pre>
  
  <p>Now, I want to update the name column with zip codes removed. <br/>
  How I can compose the update query?</p>