pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adam Sherman <adam@tritus.ca>
To: pgsql-sql@postgresql.org
Subject: Locating all Children given Set of Parents
Date: Tue, 13 May 2003 12:19:42 -0400
Message-ID: <184690000.1052842782@saturn> (raw)

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.)

Thanks,

A.

--
Adam Sherman
Tritus CG Inc.
http://www.tritus.ca/
+1 (613) 797-6819




view thread (7+ messages)  latest in thread

Message-ID: <184690000.1052842782@saturn>
Permalink:  ../184690000.1052842782@saturn/
Also on:    postgresql.org/message-id/184690000.1052842782@saturn

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: adam@tritus.ca
  Subject: Re: Locating all Children given Set of Parents
  In-Reply-To: <184690000.1052842782@saturn>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox