Solved

MySQL query to change domain of all email addresses in a field

Posted on 2008-10-26
1
473 Views
Last Modified: 2008-10-26
I have a `users` table with a field called emailaddress with about 1500 records... each of them has the same domain associated with it..

user1@dallasray.com
user2@dallasray.com
user3@dallasray.com

We are switching to a new domain so how can I write a query that was find all instances of @dallasray.com and replace them with @southtexastech.com  ?

user1@southtexastech.com
user2@southtexastech.com
user3@southtexastech.com

etc.

thank you!
0
Comment
Question by:smetterd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 27

Accepted Solution

by:
Cornelia Yoder earned 500 total points
ID: 22808057
UPDATE users SET emailaddress=REPLACE(emailaddress,'@dallasray.com','@southtexastech.com')
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question