Replace all email addresses after @ in Sql
I tried this and it worked perfectly.
UPDATE myTable SET UserEMail =
(SELECT SUBSTRING(UserEMail, 0, PATINDEX('%@%',UserEMail)) + '@example.org'
from myTable U WHERE U.UserID = myTable.UserID)
Try this
UPDATE users SET email=REPLACE(email, SUBSTRING(email,INSTR(email,'@')+1),
'example.com')