Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id F05229FA222 for ; Thu, 22 Mar 2007 17:18:31 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 79220-01-8 for ; Thu, 22 Mar 2007 17:18:24 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from vms040pub.verizon.net (vms040pub.verizon.net [206.46.252.40]) by postgresql.org (Postfix) with ESMTP id 84A0F9FBA5A for ; Thu, 22 Mar 2007 17:18:24 -0300 (ADT) Received: from [192.168.7.5] ([71.101.4.85]) by vms040.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JFB007BUN0PDGO1@vms040.mailsrvcs.net> for pgsql-sql@postgresql.org; Thu, 22 Mar 2007 15:17:14 -0500 (CDT) Date: Thu, 22 Mar 2007 16:17:55 -0400 From: Joe Subject: Re: Dummy question In-reply-to: <4602DC7A.60506@fastcon.com.br> To: "Ezequias R. da Rocha" Cc: pgsql-sql@postgresql.org Message-id: <1174594675.95579.1.camel@pampa> Organization: Freedom Circle, LLC MIME-version: 1.0 X-Mailer: Evolution 2.8.3 FreeBSD GNOME Team Port Content-type: text/plain Content-transfer-encoding: 7bit References: <4602DC7A.60506@fastcon.com.br> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/303 X-Sequence-Number: 27941 Hi Ezequias, On Thu, 2007-03-22 at 16:43 -0300, Ezequias R. da Rocha wrote: > I must use a select * from some table but i must do a join and it must > be in the were clause. > > I can't put select * from tabel1 as tb1, table2 as tb2 > where tb2.id = 2 > and tb1.fk_tb2ID = tb2.id Try select tb1.* from tabel1 as tb1, table2 as tb2 where tb2.id = 2 and tb1.fk_tb2ID = tb2.id; Joe