Matching several rows - Mailing list pgsql-sql

From Ivan Steganov
Subject Matching several rows
Date
Msg-id 3578f52e0601172043s64561353i689350a1c5d4debb@mail.gmail.com
Whole thread Raw
Responses Re: Matching several rows  (Michael Glaesemann <grzm@myrealbox.com>)
Re: Matching several rows  (Volkan YAZICI <yazicivo@ttnet.net.tr>)
Re: Matching several rows  (Ivan Steganov <istegan6@gmail.com>)
List pgsql-sql
Hi,<br /><br />This is possibly absolutely trivial but I am lost...<br /><br />A table URIGHTS which stores an ID and
theRIGHTs this ID has. One ID may have many rights and accordingly records in table, sample:<br /><br />ID        RIGHT
<br/>---------------------<br />20        1<br />20        2<br />20        5<br />20        10<br />30        2<br
/>30       10<br /><br />Now I need to find out which IDs have, say rights 2 AND 5 AND 10.<br /><br />What would be the
simplestquery? <br /><br />Thanks!  

pgsql-sql by date:

Previous
From: "Ken Winter"
Date:
Subject: Still struggling with history tables
Next
From: Michael Glaesemann
Date:
Subject: Re: Matching several rows