pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedProblem w/ Join... Using (...) Syntax
2+ messages / 2 participants
[nested] [flat]
* Problem w/ Join... Using (...) Syntax
@ 2006-06-26 23:03 operationsengineer1@yahoo.com
2006-06-26 23:16 ` Re: Problem w/ Join... Using (...) Syntax Alvaro Herrera <alvherre@commandprompt.com>
0 siblings, 1 reply; 2+ messages in thread
From: operationsengineer1@yahoo.com @ 2006-06-26 23:03 UTC (permalink / raw)
To: 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
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Problem w/ Join... Using (...) Syntax
2006-06-26 23:03 Problem w/ Join... Using (...) Syntax operationsengineer1@yahoo.com
@ 2006-06-26 23:16 ` Alvaro Herrera <alvherre@commandprompt.com>
0 siblings, 0 replies; 2+ messages in thread
From: Alvaro Herrera @ 2006-06-26 23:16 UTC (permalink / raw)
To: operationsengineer1@yahoo.com; +Cc: pgsql-sql
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.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2006-06-26 23:16 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-06-26 23:03 Problem w/ Join... Using (...) Syntax operationsengineer1@yahoo.com
2006-06-26 23:16 ` Alvaro Herrera <alvherre@commandprompt.com>
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