Usually when searching for some elements that are not displayed in another table, we can use:
select * from gifts where giftID not in (select giftID from sentgifts);
or
select * from gifts where giftID not in (select distinct giftID from sentgifts);
the second row is added with the addition of "different", so that the resulting table is smaller and probably allows faster searches "not in".
So will not use the "excellent"? Often, I don’t see that it is used in a subquery in such a case. Is there an advantage or disadvantage to using it? thank.
source
share