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

From: <operationsengineer1(at)yahoo(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Problem w/ Join... Using (...) Syntax
Date: 2006-06-26 23:03:55
Message-ID: 20060626230355.79032.qmail@web33301.mail.mud.yahoo.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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.

however, it one is named inspector_id and the other
employee_id, it doesn't work - or at least i haven't
been able to find the appropriate syntax through
searching and trial and error.

tia...

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Alvaro Herrera 2006-06-26 23:16:28 Re: Problem w/ Join... Using (...) Syntax
Previous Message Joe 2006-06-26 22:12:36 Re: avg(interval)