redbishop — 2013-10-04T14:40:39-04:00 — #1
I have the same foreign keys column name in two tables. Now when I try to do a JOIN the query no longer works. I think the error message mentioned the term "ambiguous".
Does anyone know how to fix this?
table AS T USING (countries_id)
r937 — 2013-10-04T15:26:12-04:00 — #2
yup... don't use USING
instead, use ON and fully qualify both join columns, e.g.
FROM x JOIN y ON x.foo = y.foo
redbishop — 2013-10-05T03:56:44-04:00 — #3
I suppose that might also work..
Thanks a lot Rudy, you have been a big help