DISTINCT function (distinct spec) 

The DISTINCT specification ( distinct spec ) is specified in a QUERY specification (query spec), QUERY specification (named query spec), or SINGLE SELECT statement to remove duplicate rows.

Syntax

<distinct spec> ::= DISTINCT | ALL

Explanation

A row is a duplicate of another row if both have identical values in each column. NULL values (see data type) are assumed to be identical, as are special NULL values.

DISTINCT: all duplicate rows are removed from the result table.

ALL: no duplicate rows are removed from the result table.

If no DISTINCT specification is specified, no duplicate rows are removed from the result table.