I have a list with the id and email of each user
id email 1 [email protected] 2 [email protected] 3 joao@gmailcom ...
How do I set up an sql statement to update all emails at once in my users table?
My table:
usuarios id nome sobrenome telefone email
I know that to update a record at a time would look like this:
UPDATE usuarios SET email = '[email protected]' WHERE id = 1
But how to do with several at once?
I tried to do something like this but it did not work:
UPDATE usuarios
SET email =
'[email protected]',
'[email protected]',
'joao@gmailcom'
WHERE id =
1,
2,
3