X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id D7DD59DC80C for ; Fri, 10 Mar 2006 10:26:35 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 74852-10 for ; Fri, 10 Mar 2006 10:26:39 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.cores.co.yu (cores-2.yubc.net [213.184.101.2]) by postgresql.org (Postfix) with SMTP id 139689DC83B for ; Fri, 10 Mar 2006 10:26:32 -0400 (AST) Received: (qmail 1938 invoked by uid 1013); 10 Mar 2006 14:37:10 -0000 Received: from milorad.poluga@cores.co.yu by mail by uid 1010 with qmail-scanner-1.22-st-qms (clamdscan: 0.74. spamassassin: 2.63. Clear:RC:1(10.0.1.253):. Processed in 0.024811 secs); 10 Mar 2006 14:37:09 -0000 X-Antivirus-CORESINC-Mail-From: milorad.poluga@cores.co.yu via mail X-Antivirus-CORESINC: 1.22-st-qms (Clear:RC:1(10.0.1.253):. Processed in 0.024811 secs Process 1929) Received: from unknown (HELO poluga.linsoft.co.yu) (10.0.1.253) by mail.cores.co.yu with SMTP; 10 Mar 2006 14:37:09 -0000 From: Milorad Poluga Organization: CORES To: "Fay Du" Subject: Re: How can I selet rows which have 2 columns values cross equal? Date: Fri, 10 Mar 2006 15:27:41 +0100 User-Agent: KMail/1.6.1 Cc: pgsql-sql@postgresql.org References: <001d01c64445$fec23350$b8d849c6@versaterm.com> In-Reply-To: <001d01c64445$fec23350$b8d849c6@versaterm.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <200603101527.41654.milorad.poluga@cores.co.yu> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.12 required=5 tests=[AWL=0.120] X-Spam-Score: 0.12 X-Spam-Level: X-Archive-Number: 200603/148 X-Sequence-Number: 24494 On Friday 10 March 2006 14:24, Fay Du wrote: > =A0 =A0Table test > Id =A0 | =A0a | b > -----+----+--- > 1 =A0 =A0| 100| 101 > 2 =A0 =A0| 101| 100 > 3 =A0 =A0| 100| 3 > 4 =A0 =A0| 20 | 30 > 5 =A0 =A0| 11 | 13 > 6 =A0 =A0| 3 =A0| 33 > 7 =A0 =A0| 30 | 20 >=20 select a.*=20 from test a, test b where a.a =3D b.b and a.b =3D b.a order by id Regards, Milorad Poluga =2D-=20 =2D-------------------------------------- Milorad Poluga HK CORES Beograd, Makenzijeva 31 milorad.poluga@cores.co.yu =2D--------------------------------------