50 likes | 136 Views
DML + subconsulta. SUBCONSULTA SELECT WHERE atributo IN* (SELECT ...). COMBINAÇÃO. DML INSERT UPDATE DELETE. “Filtro” de DML. DML UPDATE tabela SET campo=valor WHERE campo=valor DELETE FROM tabela WHERE campo=valor. “Filtro” de DML. DML UPDATE tabela SET campo=valor
E N D
SUBCONSULTA SELECT WHERE atributo IN* (SELECT ...) COMBINAÇÃO • DML • INSERT • UPDATE • DELETE
“Filtro” de DML • DML • UPDATE tabela SET campo=valor • WHERE campo=valor • DELETE FROM tabela • WHERE campo=valor
“Filtro” de DML • DML • UPDATE tabela SET campo=valor • WHERE campo=valor • DELETE FROM tabela • WHERE campo=valor Usar para linkar com um conjunto ( subconsulta)
“Filtro” de DML • DML • UPDATE tabela SET campo=valor • WHERE campo IN ( select ...) • DELETE FROM tabela • WHERE campo= (select MAX(cod) FROM tabela2)