-1

I have table with values like

Book ID    email1               email2
101        [email protected]     [email protected]
102        [email protected]     [email protected]
105        [email protected]     [email protected]

I want to update all the values of email1 and email2 from test.com to testmail.com

e.g [email protected]  to [email protected],
and  [email protected]   to   [email protected]  

how to write update query for this in mysql

1
  • 1
    Can you show what you have tried please. Commented Sep 12, 2019 at 9:53

1 Answer 1

0
UPDATE table_name 
SET email1 = REPLACE(email1,'@test.com ','@testemail.com '), 
    email2 = REPLACE(email2,'@test.com ','@testemail.com ')
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.