I was doing some experiments with the
SELECT DISTINCT(NAME) FROM EMPLOYEE;
SELECT DISTINCT(NAME, SURNAME) FROM EMPLOYEE;
SELECT DISTINCT(NAME), COUNT(SURNAME) FROM EMPLOYEE;
DISTINCTROW) is not a function; it is an option of the
SELECT statement that tells MySQL to strip duplicate rows from the resultset generated by the query. By default it returns all the generated rows, including the duplicates.
DISTINCT is not a function,
DISTINCT(NAME) is interpreted as
DISTINCT followed by the expression
(NAME) (which is the same as
SELECT DISTINCT(NAME, SURNAME) FROM EMPLOYEE doesn't work because
(NAME, SURNAME) is not a valid MySQL expression.