Re: Dummy question

From: Joe <dev(at)freedomcircle(dot)net>
To: "Ezequias R(dot) da Rocha" <ezequias(at)fastcon(dot)com(dot)br>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Dummy question
Date: 2007-03-22 20:17:55
Message-ID: 1174594675.95579.1.camel@pampa
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Ezequias R. da Rocha 2007-03-22 20:26:37 Re: Dummy question
Previous Message Ezequias R. da Rocha 2007-03-22 19:43:54 Dummy question