Mysql Select and Replace Query

by Sasikumar 2014-07-23 11:13:20

Mysql select and replace query is used to replace a select result with new value without affecting the db values,
Example :
SELECT REPLACE(`site`,'Hiox','hiox.org') AS site, register, expirydate FROM sitedetails;
Results that have 'Hiox' as their site value will instead return 'hiox.org' as their site value and any other rows will not be affected. This can be helpful when we need to replace a result after fetching the result.
810
like
0
dislike
0
mail
flag

You must LOGIN to add comments