Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-sql by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group