17.10 - Example: Using DEFAULT in a Predicate - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - SQL Functions, Expressions, and Predicates

Advanced SQL Engine
Teradata Database
Release Number
Release Date
July 2021
Content Type
Programming Reference
Publication ID
English (United States)

The following statement uses DEFAULT to compare the values of the Dept_No column with the default value of the Dept_No column. Because the comparison operation involves a single column reference, Vantage can derive the column context of the DEFAULT function even though the column name is omitted.

   SELECT * FROM Employee WHERE Dept_No < DEFAULT;

Note that if the DEFAULT function evaluates to null, the predicate is unknown and the WHERE condition is false.