Can Someone tell me what the following SQl means?

SELECT DISTINCTROW DEPARTME.Dptno, DEPARTME.Department, Count(*) AS [Count Of EMPLOYEE]
FROM DEPARTME INNER JOIN EMPLOYEE ON DEPARTME.Dptno = EMPLOYEE.Dptno
GROUP BY DEPARTME.Dptno, DEPARTME.Department;

Also can anyone tell me what does DISTINCTROW and DISTINCTROW means?

Thanks
can someone tell me what does INNER JOIN mean?

DISTINCTROW omits data based on entire duplicate records, not just duplicate fields.

So this query should return you all those departments that have at least one employee associated to them. If a department has no employees it will not show up in your result set. And it will not show details of these employees, only the total count of employees assuming this query works. I am not completely sure if it will though…

2 Responses to “Can Someone tell me what the following SQl means?”

  1. Niklaus Pfirsig on January 14th, 2010 at 1:37 pm

    That should give you a list of the departments with the number of employees in each department. DISTINCTROW filters out duplicate results.
    References :

  2. DISTINCTROW omits data based on entire duplicate records, not just duplicate fields.

    So this query should return you all those departments that have at least one employee associated to them. If a department has no employees it will not show up in your result set. And it will not show details of these employees, only the total count of employees assuming this query works. I am not completely sure if it will though…
    References :
    Good reference here: http://richardbowles.tripod.com/access/lesson3.htm

Leave a Reply