Examples - Teradata Vantage - Analytics Database

SQL Data Types and Literals

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-11-06
dita:mapPath
uds1628112204571.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
exs1472253032394
lifecycle
latest
Product Category
Teradata Vantageā„¢

Example: WITH DEFAULT Phrase

If the EdLev column is defined as:

EdLev BYTEINT FORMAT 'Z9' NOT NULL WITH DEFAULT,

then the column definition for EdLev is stored as:

EdLev BYTEINT NOT NULL DEFAULT 0 FORMAT 'Z9',

Example: Inserting a Row Using a Default Value

The following INSERT statement adds a row containing a zero in the EdLev field defined in the previous example:

INSERT INTO Employee
 (Name, EmpNo, DeptNo, DOB, Gender, EdLev)
 VALUES ('Newhire A', 10025, 700, '49/10/17', 'M',) ;

Example: TIME Column With a Default of the Current Time

The following example shows a TIME column specified with a default of the current time:

Stage TIME(3) WITH DEFAULT

Example: INTERVAL Column With a Default Interval

The following example shows an INTERVAL column specified with a default interval:

Scale INTERVAL HOUR(2) WITH DEFAULT