I have three SQL tables: TableA, TableB, and TableC
TableA is a primary key table with foreign keys in TableB and TableC (i.e. TableA is connected to TableB and TableC separately).
Example:
TableA: tableA_id
TableB: tableB_id, tableA_id
TableC: tableC_id, tableA_id
I want to return records from tableA, which matches with the record in tableB (inner join), but returned records are not in tableC. Can this be done with a single SQL statement?
Thanks.
1 Answer