Fórum Como usar o comando EXISTS no SELECT? #40272
20/11/2003
0
Preciso selecionar os valores da tabela1 mas que nao existam na tabela2.
Billy
Curtir tópico
+ 0
Responder
Post mais votado
20/11/2003
select * from tabela1 t1
where not exists (select 1 from tabela2 t2 where t2.valor = t1.valor)
T+
where not exists (select 1 from tabela2 t2 where t2.valor = t1.valor)
T+
Afarias
Responder
Gostei + 2
Mais Posts
20/11/2003
Billy
select * from tabela1 t1
where not exists (select 1 from tabela2 t2 where t2.valor = t1.valor)
T+
Responder
Gostei + 1
Clique aqui para fazer login e interagir na Comunidade :)