Distinct - Teradata Database - Teradata Vantage NewSQL Engine

SQL Data Manipulation Language

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-03
dita:mapPath
fbo1512081269404.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval
dita:id
B035-1146
lifecycle
previous
Product Category
Teradata Vantage™

DISTINCT specifies that duplicate values are not to be returned when an expression is processed.

Syntax Elements

DISTINCT
Only one row is to be returned from any set of duplicates that might result from a given expression list. Rows are duplicates only if each value in one is equal to the corresponding value in the other.
If you specify DISTINCT and an expand_alias in the select list, Teradata Database performs the DISTINCT operation after the EXPAND operation to ensure that duplicate rows are removed from the expanded result.
If you specify DISTINCT but do not specify an expand_alias in the select list, the system ignores the EXPAND ON clause (even if you specify one), and does not expand rows.
You cannot specify DISTINCT if any member of the select column list is a LOB column.

ANSI Compliance

DISTINCT is ANSI SQL:2011-compliant.