Omitting the Column Name - 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

You can use the form of DEFAULT that omits the column name under certain conditions in an INSERT, UPDATE, or MERGE statement or in a predicate clause that involves a comparison operation. The form of DEFAULT that omits the column name cannot be part of an expression.

When the DEFAULT function does not specify a column name, Vantage derives the column based on context. For example, consider the following table definition:

CREATE TABLE Manager
   (Emp_ID      INTEGER
   ,Dept_No     INTEGER DEFAULT 99
);

The following INSERT statement uses DEFAULT without a column name to insert the default value into the Dept_No column:

INSERT INTO Manager VALUES (103499, DEFAULT);

Using the DEFAULT function without specifying a column name can produce an error if Vantage cannot derive the column context.

For an example that omits the column name when using the DEFAULT function in a predicate clause that involves a comparison operation, see Example: Using DEFAULT in a Predicate.

See the following statements for details on using the DEFAULT function: