The dot .
is usually the table name. In the sentence you mention, d
is the name of the alias name. If you check the FROM
statement, you have department d
. That means that you want to fetch rows from the table department
but reference it as d
(because department
is a long word), so you create an alias.
In order to disambiguate fields, as different tables may have the same field names, you can prepend the field with the table name (or alias in you case) followed by the dot.
So in short you're saying:
Select the field name
from alias d
, and count the number of employees from the join of tables department
and employee
, aliased d
and e
respectively, etc.
thank you, you help me a lot, saving me from the confusion – edgards – 2015-12-25T12:11:17.573
You're welcome. Feel free to accept this answer so other users may know it is the one that helped you best. You can also wait a time so other users can also answer and then accept the answer that helped you most (this is optional but recommended). – nKn – 2015-12-25T12:15:43.823