MySQL: Replacing the first 0 with 44

I have a problem I hope someone can help me with. I have about 2000 records that I need to change permentantly in a MySQL database -mobile numbers that start with 0 need to be changed so that they start with 44. I have been looking on every forum I can find but cannot find an answer. If anyone has any suggestions, I would be very very grateful. I am quite new to MySQL so go easy on me!



I am not sure I understand your question correctly, but I think you need something like:

UPDATE numbersSET number = CONCAT(‘44’, SUBSTRING(number,2))WHERE 1 AND number LIKE ‘0%’

If you do this query frequently, it would perform better with an index on the number column.

Thank you so much - the code worked brilliantly!