DEFAULT Function Syntax | VantageCloud Lake - DEFAULT Function Syntax - Teradata VantageCloud Lake

Lake - Working with SQL

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
jbe1714339405530.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
jbe1714339405530
DEFAULT [ ( column_name ) ]

Syntax Elements

column_name
The name of a column in a base table, view, queue table, or derived table.
The column name can be qualified or unqualified.
The DEFAULT function returns the default value of the specified column or derived column (if column_name is omitted).
If the specified or derived column is a view column or derived table column, the DEFAULT function returns the default value of the underlying table column.
If the default value of a column evaluates to a system variable, for example when the default value is CURRENT_TIME or USER, the DEFAULT function returns the value of the system variable at the time the statement runs.
DEFAULT returns null when any of the following conditions are true:
  • The specified or derived column was defined with a DEFAULT NULL phrase
  • The specified or derived column has no explicit default value
  • The specified or derived column is the name of a view column that is derived from a single underlying table column that has no explicit default value

    For an example, see “Example: Specifying a View Column Name”.

  • The specified or derived column is the name of a view column that is not derived from a single underlying table column, for example, the view column is derived from a literal expression