Default Value Control Phrases | Data Types and Literals | Teradata Vantage - Using Default Value Control Phrases - Advanced SQL Engine - Teradata Database

SQL Data Types and Literals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
zsn1556242031050.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1143
lifecycle
previous
Product Category
Teradata Vantageā„¢

A default value control phrase determines the action to take when you do not supply a value for a field.

Rules and Guidelines

The following rules and guidelines apply to default value control phrases:
  • Default value control phrases are only valid with the following data definitions.
    • Fields defined in CREATE TABLE and ALTER TABLE statements
    • Parameters defined in CREATE MACRO and REPLACE MACRO statements
  • Default value controls are not effective for views and expressions.
  • The default value for a field is null unless you specify NOT NULL, in which case there is no default value if you do not specify the DEFAULT phrase.
  • The presence of nulls can affect query performance negatively; therefore, consider using the NOT NULL default value phrase unless you intend to have nulls in the column.

The default control value phrases are documented individually in the remaining topics in this section.