Helpful Information
Home
Categories
Contact us
Category: Databases
solve nested .. not in (select ..) ?!
I can read in the manual that these nested queries cannot be made. However there is no example on how to solve my problem w/o nesting:
select * from product where prodId not in (select catProdId from categoryMember)
What I want, obviously, is to show all products not being member of any category.
Thnx for any tips,
/erik
It is possible to rewrite this subselect as a left join....
select product.*
from product LEFT JOIN categoryMember
ON product.prodID=categoryMember.catProdID
WHERE categoryMember.catProdID IS NULL;
privacy (GDPR)