Eliminating Duplicate Rows

Use the DISTINCT keyword to eliminate the duplicate rows.

Selecting DISTINCT Rows

For example, the following command returns many duplicate rows:
SELECT city, state FROM Employees
To list only unique combinations of city and state, use this command:
SELECT DISTINCT city, state FROM Employees
Note: The ROLLUP and CUBE operators do not support the DISTINCT keyword.