pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
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.



view thread (2+ messages)

Message-ID: <20060626231627.GG11926@surnet.cl>
Permalink:  ../20060626231627.GG11926@surnet.cl/
Also on:    postgresql.org/message-id/20060626231627.GG11926@surnet.cl

 · 

reply

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