MySQL Forums
Forum List  »  Newbie

Re: MySQL Find and Replace
Posted by: Shantanu Oak
Date: April 03, 2005 07:19AM

SELECT REPLACE(cust5, 'Interbrew', 'InBev') from Inl_custom

The 'Interbrew' is case sensitive. You will have to change the word to lower case to make replace non case-sensitive.
SELECT REPLACE(cust5, LOWER('Interbrew'), 'InBev') from Inl_custom

This query will only display the changed word. It will not actually update the table. You need....
UPDATE Inl_custom
SET cust5 = REPLACE(cust5, 'Interbrew', 'InBev')

Options: ReplyQuote


Subject
Written By
Posted
April 03, 2005 03:21AM
Re: MySQL Find and Replace
April 03, 2005 07:19AM
April 04, 2005 12:10AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.