I know that it is possible to execute a INSERT
with data from another table:
INSERT INTO Tabela (Col01, Col02, Col03)
SELECT Col01, Col02, Col03
FROM Outra_tabela
WHERE Condicao = 'qualquer coisa'
But I would like to do the same with UPDATE
. Something like this:
UPDATE Tabela SET Col01, Col02, Col03
SELECT Col01, Col02, Col03
FROM Outra_tabela
WHERE Condicao = 'qualquer coisa'
WHERE Tabela.id = Outra_tabela.id
Is it possible? How?