in practice, there's no difference... from the postgres docs (http://
www.postgresql.org/docs/8.4/static/sql-select.html) -

USING ( join_column [, ...] )
A clause of the form USING ( a, b, ... ) is shorthand for ON
left_table.a = right_table.a AND left_table.b = right_table.b ....
Also, USING implies that only one of each pair of equivalent columns
will be included in the join output, not both.

so in your example you'd only get a single "id" column in the output
rather than 1 from each of the employees and managers tables...


On Sep 29, 4:24 pm, Clive Crous <[email protected]> wrote:
> If I may I'd like to ask a SQL question here.
>
> What is the difference between:
>
> SELECT * FROM employees
> INNER JOIN managers USING (id);
>
> and
>
> SELECT * FROM employees
> INNER JOIN managers ON managers.id=employees.id;
>
> ?
>
> Thanks,
> Clive
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to