title: Update part of a string in SQL
body: <p>I would like to update a part of string in a particular column of my database.</p>
  
  <p>I have cm2 in the particular column of my database and would like to update it to cm2.</p>
  
  <p>My sql query to find the cm2 is:</p>
  
  <pre><code>SELECT * 
  FROM  `question_table` 
  WHERE  `option` LIKE  '%cm2%'
  </code></pre>
  
  <p>To update I want to try is this:</p>
  
  <pre><code>Update question_table.option
  set Value = replace(value,'cm2','cm&lt;sup&gt;2&lt;/sup&gt;').
  </code></pre>
  
  <p>Not sure whether this is correct. Need some guidance on this.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Syntax:</p>
  
  <pre><code>UPDATE question_table SET option = Replace(option, 'cm2','cm&lt;sup&gt;2&lt;/sup&gt;')
  WHERE option LIKE  '%cm2%'
  </code></pre>
  
  <p>It throws me an error as:</p>
  
  <pre><code>#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'option = Replace(option, 'cm2','cm&lt;sup&gt;2&lt;/sup&gt;') WHERE option LIKE '%cm2%'' at line 1
  </code></pre>