Change Domain Name in Email ID in SQL Server

Mandeep Singh
Mandeep Singh used Ask the Experts™
on
Hi,

I have table employee, now i want to change domain name of all employee email id. Like this:

from info@google.com to info@facebook.com how can i do it in SQL Server.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Database and Application Developer
Commented:
Update employee Set EmailField = REPLACE (EmailField,'google.com','facebook.com')

Open in new window


I have included .com in case an email had the word google in it elsewhere other than its domain.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial