Examples - Teradata Database

SQL Data Manipulation Language

Product
Teradata Database
Release Number
15.10
Language
English (United States)
Last Update
2018-10-06
dita:id
B035-1146
lifecycle
previous
Product Category
Teradata® Database

Example : Using ALL

In contrast to the second statement in “Example 1: Simple Uses of DISTINCT” on page 66, this statement returns the department number for every employee:

     SELECT ALL dept_no 
     FROM employee;

ALL is the default option, except in query expressions using set operators, where ALL is an option, but not the default. See SQL Functions, Operators, Expressions, and Predicates.