Skip to content

Instantly share code, notes, and snippets.

@milesw
Created December 22, 2016 03:33
Show Gist options
  • Save milesw/8268453c1efb4b20fdd1f78564b0eed2 to your computer and use it in GitHub Desktop.
Save milesw/8268453c1efb4b20fdd1f78564b0eed2 to your computer and use it in GitHub Desktop.
MySQL - blank out domains in email addresses
UPDATE table_name
SET email_field = CONCAT(LEFT(email_field, INSTR(email_field, '@')), 'localhost.localdomain')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment