39
I know it’s possible to execute one 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’d like to do the same with a 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?