Mysql Select and Replace Query
by Sasikumar[ Edit ] 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,
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.