Matching a column from a table to another table I have 2 tables in a Oracle database and if I do:

SELECT ID,ID_EXTERN_FOR_JOB FROM SOL_PUBLIC.SOL_SUBSOL_CHESTIONARE@RACDB
WHERE ID=1207;


I get:

ID      ID_EXTERN_FOR_JOB
1207    -1


On the other table, if I do:

SELECT ID,ID_EXTERN_FOR_JOB FROM SOL.SOL_SUBSOL_CHESTIONARE
WHERE ID_EXTERN_FOR_JOB=1207;


I get

ID      ID_EXTERN_FOR_JOB
2009    1207


And I want to find out all the rows that don't match this "rule" of having the ID_EXTERN_FOR_JOB from SOL in ID FROM SOL_PUBLIC and I don't know how to do that. Thanks!
Try this one:

SELECT  PRIV.id_extern_for_job
,       PRIV.id
,       PUB.id_extern_for_job
FROM    SOL_PUBLIC.SOL_SUBSOL_CHESTIONARE@RACDB     PUB
,       SOL.SOL_SUBSOL_CHESTIONARE                  PRIV
WHERE   PRIV.id_extern_for_job = PUB.id
AND     PRIV.id &lt;&gt; PUB.id_extern_for_job;