Tuesday, 18 September 2012

How to Find and Replace Data in MySQL

How to Find and Replace Data in MySQL :

Replace .JPG(Capital Letter) to .jpg(Small Letter)

Syntax :

update [table_name] set [field_name] = replace([field_name],'[string_to_find]','[string_to_replace]');

Example :

update products_bk set product_first_image = replace(product_first_image,'.JPG','.jpg');

No comments:

Post a Comment