Featured Database Articles

Introduction to Databases for the Web: Pt. 2 - Page 7

Distinct

It will often be the case that several rows will
contain duplicate data in a specified column and that you will
only want to view one to represent the group. For example,
suppose you wanted to find out which employees had made
sales in the
SALES table.

If you were to use:

SELECT E_NUM
FROM SALES;

you would get:

E_NUM
-----
101
102
101
-----

In this case, Employee number 101
has been reported twice even though once is enough. In this
case, you would use the DISTINCT operator to filter out duplicates.