Re: filtering out doubles with SELECT

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Jules Alberts <jules(dot)alberts(at)arbodienst-limburg(dot)nl>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: filtering out doubles with SELECT
Date: 2003-03-12 15:13:35
Message-ID: 20030312151335.GA25424@wolff.to
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).

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Jens Eliasson 2003-03-12 15:25:26 Re: SERIAL does not ROLLBACK
Previous Message Tim Pushor 2003-03-12 14:52:27 Re: SERIAL does not ROLLBACK