Microsoft
Software
Hardware
Network
Question : MySQL command to replace data in tables
Hello everyone,
not very familiar with SQL statements but hope one of you can help me out. Here's what I want to do:
I have a test website which I have populated as a clone of another one. I need to modify the database so that member information stays confidential to the programmers who will be working on the site/database. I need to delete all email addresses in a field and replace them with a bogus email so that programmers who are working on the database cannot potentially harvest these emails. Since the test site does not need them I want to change them all. I don't want to delete the table item because it's required.
Is there a SQL command I can execute in MySQL that will look for anything before and after a @ and replace it with
[email protected]
?
Would you be able to provide me with the exact statement? The table is called member and the field is called email
I know I need to be doing something like: UPDATE members SET email = replace(email,"%@%","noema
il@noemail
.com") but it does not work and I can't figure out what I need to do.
Thanks!
Answer : MySQL command to replace data in tables
You can simply do like this if you want to update all the emails with
[email protected]
updte members
set email = '
[email protected]
'
where email like '%@%'
Random Solutions
Query as Control Source
Update Query to Delete everything to thr right: 4th comma
VS 2008 Hangs (slow) on Open Website when searching through Mapped Network Drives
Disabling SSLv2 in IIS7 on Win 2008 64 bit machine
Attach-Detach vs. Backup-Restore database ?
Techincal windows based questions to be answered by windows gurus?will you guys?
Exchange 2003 Private Store increased/decreased
Windows XP drops network connection freezes because of offline files
RDP Though Proxy
OCS Client error when trying to expand Distribution list members