Created
June 9, 2022 13:10
-
-
Save dillonhafer/ffd0516419a900fc33c54ee02e3e48a6 to your computer and use it in GitHub Desktop.
Sanitize emails in mysql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
update users | |
set email = replace( | |
email, | |
substring( | |
email, | |
locate('@', email), | |
length(email) - locate(email, '@') | |
), | |
'@example.com' | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment