Answer the question
In order to leave comments, you need to log in
Is it correct to use data from different tables without joins?
In general, I found such a fragment in theory.
SELECT gname FROM Goods
WHERE id_g NOT IN (
SELECT good FROM Payments WHERE Year(PDate) = 2005
)
Is this entry correct? After all, in the subquery, we take data from another table, and we do not perform any joins. Since we are entering data from another table into the NOT IN operator which refers to the id_g field, which is simply a key one.
Or is there something related to foreign keys?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question