Atenção
Tabelas R e S referentes a um banco de dados relacional.
R | |
a | b |
1 | 2 |
2 | 3 |
4 | 5 |
S | |
c | d |
3 | 2 |
4 | 2 |
6 | 1 |
Considerando as tabelas R e S apresentadas anteriormente, o resultado
a | b |
1 2 | 2 3 |
seria obtido pela execução do comando SQL:
select * from R
where not exists (select * FROM S where a=c)
select * from R
where not exists (select * FROM S where a=d)
select * from S
where not exists (select * FROM R where a=c)
select * from S
where not exists (select * FROM R where a=d)
select * from R
where exists (select * FROM S where b=d)