From: Ivan Steganov <istegan6@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Matching several rows
Date: Wed, 18 Jan 2006 05:43:18 +0100
Message-ID: <3578f52e0601172043s64561353i689350a1c5d4debb@mail.gmail.com> (raw)
Hi,
This is possibly absolutely trivial but I am lost...
A table URIGHTS which stores an ID and the RIGHTs this ID has. One ID may
have many rights and accordingly records in table, sample:
ID RIGHT
---------------------
20 1
20 2
20 5
20 10
30 2
30 10
Now I need to find out which IDs have, say rights 2 AND 5 AND 10.
What would be the simplest query?
Thanks!
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: istegan6@gmail.com
Subject: Re: Matching several rows
In-Reply-To: <3578f52e0601172043s64561353i689350a1c5d4debb@mail.gmail.com>
* 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