If i understand you well, you want to get entries from
CTInterface
table which have no related data in
revenues
table. You need to use
LEFT JOIN
.
select cti.*
from CTInterface cti LEFT JOIN revenues rev ON cti.<PrimaryKey> = rev.<ForeignKey>
WHERE rev.accttype IS NULL
For further details, please see:
Visual Representation of SQL Joins[
^]
Note: you have to replace value between
<...>
with proper field name.