Re: filtering out doubles with SELECT

From: "Jules Alberts" <jules(dot)alberts(at)arbodienst-limburg(dot)nl>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: filtering out doubles with SELECT
Date: 2003-03-13 07:35:36
Message-ID: 20030313073627.4695A1CB1B1@koshin.dsl.systemec.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

> On Wed, Mar 12, 2003 at 12:11:05 +0100,
> Jules Alberts <jules(dot)alberts(at)arbodienst-limburg(dot)nl> wrote:
> >
> > select * from tbl t1 where not exists (select * from tbl t2 where
> > t1.COL1=t2.COL1 and t1.COL2=t2.COL2 and t1.oid <> t2.oid)
>
> Using DISTINCT ON might be faster (though it's nonstandard).

Thanks, I didn't know that one!

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message paul butler 2003-03-13 07:52:03 Re: client
Previous Message Michiel Lange 2003-03-13 07:07:56 looking up members of a group