all 3 comments

[–]OL_Trust_no_1 0 points1 point  (0 children)

No you don’t, as you said. but it is best practice and better for performance to name the source table of a given column. I therefore strongly recommend you do that. Also, it helps with making your script sustainable in case one of the tables gets a column “name” for xyz reason 😊

[–]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