create table test_fk(c1 date primary key deferrable);
create table test_fk1(b1 date references test_fk(c1) deferrable);
alter session set constraints=deferred;
insert into test_fk1 values(sysdate);
insert into test_fk1 values(sysdate);
insert into test_fk1 values(sysdate);
SELECT t1.C1, t.B1 FROM TEST_FK1 t LEFT JOIN TEST_FK t1 ON (t1.C1 = t.B1) WHERE t1.C1 IS NULL AND t.B1 IS NOT NULL;
C1 B1
---------------------- ----------------------
18-OCT-2013 16.38.43
18-OCT-2013 16.38.48
18-OCT-2013 16.38.46
SELECT t.B1 FROM TEST_FK1 t LEFT JOIN TEST_FK t1 ON (t1.C1 = t.B1) WHERE t1.C1 IS NULL AND t.B1 IS NOT NULL;
no rows selected