DISTINCT Option | SQL SELECT Statements | Teradata Vantage - DISTINCT - Analytics Database - Teradata Vantage

SQL Data Manipulation Language

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2024-12-13
dita:mapPath
pon1628111750298.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
esx1472246586715
lifecycle
latest
Product Category
Teradata Vantageā„¢

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

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, the 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.