Adam,
> I have three tables: parents, children & parent_child_mm.
>
> (So Parents and Children are in a Many-to-Many relationship.)
>
> Given a set of Parents, say 1, 2 & 3, how do I retrieve all children in an
> efficient manner? (I want each child to appear only once.)
Easy:
Select children.*
from children where exists (select pc_id from parent_childwhere pc.child_id = children.idand pc.parent_id IN
($parent_id_list));
--
Josh Berkus
Aglio Database Solutions
San Francisco