From: Alvaro Herrera <alvherre@commandprompt.com>
To: operationsengineer1@yahoo.com
Cc: pgsql-sql@postgresql.org
Subject: Re: Problem w/ Join... Using (...) Syntax
Date: Mon, 26 Jun 2006 19:16:28 -0400
Message-ID: <20060626231627.GG11926@surnet.cl> (raw)
In-Reply-To: <20060626230355.79032.qmail@web33301.mail.mud.yahoo.com>
References: <20060626230355.79032.qmail@web33301.mail.mud.yahoo.com>
operationsengineer1@yahoo.com wrote:
> how does one apply the JOIN... USING (...) syntax when
> the primary key and foreign key have different names?
>
> JOIN t_employee USING (employee_id)
>
> works perfect when the primary and foreign key are
> both named employee_id.
t_inspection JOIN t_employee
ON (t_employee.employee_id = t_inspection.inspector_id)
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: alvherre@commandprompt.com, operationsengineer1@yahoo.com
Subject: Re: Problem w/ Join... Using (...) Syntax
In-Reply-To: <20060626231627.GG11926@surnet.cl>
* 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