• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 561
  • Last Modified:

update mysql table with a prepend text


I'd like to update a set of records where the column name='picture' where id>='1'.
id is the primary key, auto increment field.

The picture field has values like:

But I'd like like to prepend the url with:
so the picture field values should be:

How do I do this with one mysql statement?

Thank you,
Victor Kimura
Victor Kimura
1 Solution
theGhost_k8Database ConsultantCommented:
update tablename set pictureField=concat('http://cosmeticguide.com',pictureField);
Victor KimuraSEO, Web DeveloperAuthor Commented:
Thank you!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now