ALL specifies that duplicate values are to be returned when an expression is processed.
ALL is the default option, except in query expressions using set operators, where ALL is an option, but not the default. For more information, see Teradata Vantage™ SQL Functions, Expressions, and Predicates, B035-1145.
Syntax Elements
- ALL
- All rows, including duplicates, are to be returned in the results of the expression list.
ANSI Compliance
ALL is ANSI SQL:2011-compliant.
Example: Using ALL
In contrast to the second statement in Example: Simple Uses of DISTINCT, this statement returns the department number for every employee:
SELECT ALL dept_no FROM employee;