It is easier to think of this as SET INTERSECTION which leads to:
SELECT id FROM urights WHERE right = 2
INTERSECT
SELECT id FROM urights WHERE right = 5
INTERSECT
SELECT id FROM urights WHERE right = 10
Ivan Steganov wrote:
> Thank you to everyone for the great help!
>
> I will evaluate all methods in our query (It is actually well complexer then
> this sample) and choose the best one.
>
> Is there any "scientific" name to this kind of "several rows match for one
> result" data selection?
>
> Ivan
>