SQL Update query to populate cells with extra data


i currently have a mysql database with misc information within. and i am trying to populate the image column with the productcodes column data with an extra field being .jpg

product / productcode / image:
999 / 241441      /            
1016 / 233009 /      

so the above becomes the same as below

product:      productcode:      image:
999            241441            241441.jpg                  
1016            233009            233009.jpg

is there an easy update sql query that can be ran to complete the task? or do i need to go back to the drawing board.

thank you for the help in advance
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You may use this statement:
update table1 set image = productcode+'.jpg'
TG-SteveAuthor Commented:
query seems to run fine but it is not adding the .jpg

if i go into the phpadmin and click edit i can manually type the productcode plus.jpg and it updates fine
Let's try CONCAT function:
update table1 set image = CONCAT(productcode,'.jpg')

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Acronis Data Cloud 7.8 Enhances Cyber Protection

A closer look at five essential enhancements that benefit end-users and help MSPs take their cloud data protection business further.

TG-SteveAuthor Commented:
well done jimyx worked great. i know this is being concluded now but i just realised that there is a column next to image named "noimages" which needs flagging with 1 instead of 0 if images have been uploaded. can this be inserted into the same query or does it need running seperatly? i understand if you cannot answer and will open another thread.

kind regards
It can be in the same query:
update table1 set image = CONCAT(productcode,'.jpg'), noimages = '1'

TG-SteveAuthor Commented:
Thanks again jimyx
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.