|RE: [firebird-support] Testing a ref constraint violation
>If I understand correctly then something along these lines would do
> I want to set up a multi column foreign key from table B
> (detail) to A (master), but it fails due to violation of the
> primary key in A.
> How would the most straightforward SQL look, if I want to
> find the records in table B who's constraint fields are non
> existent in table A?
select * from b
right join a on b.a_id = a.id -- add rest of the join conditions
where b.id is null