From: Milorad Poluga <milorad.poluga@cores.co.yu>
To: Fay Du <fay.du@versaterm.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: How can I selet rows which have 2 columns values cross equal?
Date: Fri, 10 Mar 2006 15:27:41 +0100
Message-ID: <200603101527.41654.milorad.poluga@cores.co.yu> (raw)
In-Reply-To: <001d01c64445$fec23350$b8d849c6@versaterm.com>
References: <001d01c64445$fec23350$b8d849c6@versaterm.com>
On Friday 10 March 2006 14:24, Fay Du wrote:
> Table test
> Id | a | b
> -----+----+---
> 1 | 100| 101
> 2 | 101| 100
> 3 | 100| 3
> 4 | 20 | 30
> 5 | 11 | 13
> 6 | 3 | 33
> 7 | 30 | 20
>
select a.*
from test a, test b
where a.a = b.b and a.b = b.a
order by id
Regards, Milorad Poluga
--
---------------------------------------
Milorad Poluga
HK CORES Beograd, Makenzijeva 31
milorad.poluga@cores.co.yu
---------------------------------------
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: milorad.poluga@cores.co.yu, fay.du@versaterm.com
Subject: Re: How can I selet rows which have 2 columns values cross equal?
In-Reply-To: <200603101527.41654.milorad.poluga@cores.co.yu>
References: <001d01c64445$fec23350$b8d849c6@versaterm.com> <200603101527.41654.milorad.poluga@cores.co.yu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox