Dadas duas tabelas relacionais R(A,B) e S(A,C), o comando que remove todos os registros de R que não tenham um registro correspondente em S através da coluna A é
delete from r
where r.a <> s.a
from s
where r.a not in s.a
where not exists(select * from s where r.a=s.a)
where exists(select * from s where r.a <> s.a)