Re: How can I selet rows which have 2 columns values cross equal?

From: Milorad Poluga <milorad(dot)poluga(at)cores(dot)co(dot)yu>
To: "Fay Du" <fay(dot)du(at)versaterm(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: How can I selet rows which have 2 columns values cross equal?
Date: 2006-03-10 14:27:41
Message-ID: 200603101527.41654.milorad.poluga@cores.co.yu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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(dot)poluga(at)cores(dot)co(dot)yu
---------------------------------------

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message PFC 2006-03-10 14:32:29 Re: How can I selet rows which have 2 columns values cross equal?
Previous Message Fay Du 2006-03-10 13:24:44 How can I selet rows which have 2 columns values cross equal?