Entering content frame

DISTINCT function (distinct spec) Locate the document in the library structure

The DISTINCT specification (distinct_spec) is specified in a QUERY specification or in a SINGLE SELECT statement to remove duplicate rows.

Syntax

<distinct_spec> ::= DISTINCT | ALL

Examples

SQL Tutorial, Structure linkSelecting and Arranging Rows

Explanation

A row is a duplicate of another row if both have identical values in each column. NULL values are assumed to be identical. Special NULLvalues are also assumed to be identical.

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

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

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

 

Leaving content frame