Reputation: 373
In general, is there any difference in result set or query performance between:
SELECT * FROM tableA JOIN tableB USING (id);
and
SELECT * FROM tableA ta JOIN tableB tb ON (ta.id = tb.id);
If so, what is the difference?
Pros / Cons to using one over the other?
Upvotes: 2
Views: 810
Reputation: 1269463
When you say USING
, then the columns are treated differently in the query:
join
keys. (I think this is a good practice anyway, but USING
requires it.)SELECT *
, then the join keys are only returned once.Upvotes: 9