Re: Problem w/ Join... Using (...) Syntax

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: operationsengineer1(at)yahoo(dot)com
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Problem w/ Join... Using (...) Syntax
Date: 2006-06-26 23:16:28
Message-ID: 20060626231627.GG11926@surnet.cl
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-sql

operationsengineer1(at)yahoo(dot)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.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Kyle Bateman 2006-06-26 23:30:12 permissions from system catalogs
Previous Message operationsengineer1 2006-06-26 23:03:55 Problem w/ Join... Using (...) Syntax