Performing intersection without intersect operator

From: "Nacef LABIDI" <nacef(dot)l(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Performing intersection without intersect operator
Date: 2008-10-28 11:14:24
Message-ID: f16f7ea00810280414xe6edc4fme3ab158625a73546@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi all,

I want to perform an intersection between several select queries but without
using the INTERSECT keyword.

select userid from orders where productid=1 INTERSECT select userid from
orders where productid=2

I want to transform it without the INTERSECT.

Thanks to all

Nacef

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Oliveiros Cristina 2008-10-28 11:51:05 Re: Performing intersection without intersect operator
Previous Message Jan Peters 2008-10-28 08:23:40 Re: How to hand over array as variable in plpgsql function?