Append value to the beginning of a field

Hi Guys!

I am trying to add a value to the beginning of a field in my database (there are over 20,000 rows, so it’s impossible to do manually).

I tried the following query, which added the value to the end of the field. Is there a way to add it to the beginning of a field like a prefix.


update users set cv = CONCAT(cv, 'uploads/users/cvs/');


update users set cv = CONCAT('uploads/users/cvs/', cv);

PS - when running an UPDATE like this, you should always first run it as a SELECT first to ensure you get the results you’re looking for… otherwise you may permanently screw up your DB!!!

e.g.

SELECT CONCAT('uploads/users/cvs/', cv) FROM users;