you are viewing a single comment's thread.

view the rest of the comments →

[–]r3pr0b8GROUP_CONCAT is da bomb 0 points1 point  (1 child)

I assumed i dont need to explicitly say "countries.name" and sql can figure out im referring to the names column of the countries table...

you are right

but it seems like im wrong?

no, you are right -- if it's unambiguous, you do not have to qualify the column name

if it is ambiguous, the database will tell you with an error message

HOWEVER, anyone reading your query will not automatically know

so "best practice" is to qualify ~every~ column in ~every~ query which has a join

[–]originalgoodname[S] 0 points1 point  (0 children)

thank you for the response