I have a table of email addresses:
CREATE TABLE contacts(
email VARCHAR(255)
)
INSERT INTO contacts VALUES
('example.person@gmail.com'),
('example.person2@gmail.com'),
('example.person3@gmail.com');
How can I find and replace the email format so example.person@gmail.com -> example.person_gmailcom@test.com?
E.g:
UPDATE contacts
SET email = REGEXP_REPLACE(email, '@', '@test.com');
Results in example.person@test.comgmail.com
Playground here: https://dbfiddle.uk/GnIfomiO