MySQL - Update images name in database from .jpg to .png -


i need in updating database, have column named 'questionlink' in table 'question' contains names of images, (image1.jpg, image2.jpg, image3.jpg) there 100s of images, , have remane .png extension...

i firstly trying show records query, no way near solution.

select * question "questionlink" '%.jpg%'

any appriciated. thanks

are looking this?

update question   set questionlink = replace(questionlink, '.jpg', '.png'); 

here sqlfiddle demo

further reading replace()


Comments