Replace a specific part of a string I have many strings in the database like:

&lt;iframe src="https://www.youtube.com/embed/-qTiYA1WiY8&amp;index=8&amp;list=PLPNcLSfYNC3Dw535smncyHRCBRmdf1Bti"
    frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;


Original

www.youtube.com/embed/-qTiYA1WiY8&amp;index=8&amp;list=PLPNcLSfYNC3Dw535smncyHRCBRmdf1Bti

Desired

www.youtube.com/embed/-qTiYA1WiY8

So final string can be converted to: 

&lt;iframe src="https://www.youtube.com/embed/-qTiYA1WiY8"
    frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;


I can do this using PHP, but I want to do it with a MySQL query. I tried to use:

UPDATE MyTable    
    SET StringColumn = REPLACE (StringColumn, 'SearchForThis', 'ReplaceWithThis')


It needs to be a general solution that can replace string from &amp; and before " if exist in the string. I am not able to get the proper result.
If the strings are all the same, and the column is called c1 in a table called t1 then SUBSTRING_INDEX() might get you there.  Don't update your table until you've verified it with SELECT. 

Whitespace added for clarity.

SELECT CONCAT(
  SUBSTRING_INDEX(c1,'&amp;',1),
  '"',
  SUBSTRING_INDEX(c1,'"',-3)
) FROM t1;


SELECT the substring left of the first '&amp;' counting from the left, a literal " and then the substring right of the third " counting from the right.

The only caveat is that the link format you've shown seems wrong.  The first "&amp;" seems like it should have been "?" instead, and you should be clipping it at the "?" which marks the start of the query string in a URL.  Perhaps youtube was doing something nonstandard with URLs to work around plugin or browser issues.