Reputation: 506
I want to replace user domains with some other domains in mysql. for eg. I want to change :
[email protected] to [email protected].
Upvotes: 2
Views: 913
Reputation: 506
I also have tried this and it worked as well.
update table1 set email =concat(SUBSTRING(email,1,INSTR( email,'@' )),'abxy.com')
Upvotes: 1
Reputation: 13506
Your questions is not very clear,you can use REPLACE
if you just need to change the domain of it,similar sql as below:
UPDATE table1 SET address=REPLACE(address,'@rocket.com','@abxy.com')
Upvotes: 3