Como usar o comando EXISTS no SELECT?
Preciso selecionar os valores da tabela1 mas que nao existam na tabela2.
Billy
Curtidas 0
Melhor post
Afarias
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+
GOSTEI 2
Mais Respostas
Billy
20/11/2003
select * from tabela1 t1
where not exists (select 1 from tabela2 t2 where t2.valor = t1.valor)
T+
GOSTEI 1