We are in habit of using str_replace() of PHP, but MySQL also provide replace function for same purpose. The REPLACE() function takes three parameters:
The string or column name to do the replacement on
What to look for
What to replace it with
SELECT REPLACE('My name is garav','garav','Gaurav.')as result;
result:My name isGaurav.
Excellent.
ReplyDeleteKeep it up:)