3
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 mount an sql statement to update all emails at once in my user table?
My table:
usuarios id nome sobrenome telefone email
I know that to update one 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 didn’t work:
UPDATE usuarios
SET email =
'[email protected]',
'[email protected]',
'joao@gmailcom'
WHERE id =
1,
2,
3