15.00 - Rules for Using NULL as a Literal - Teradata Database

Teradata Database Design

prodname
Teradata Database
vrm_release
15.00
category
User Guide
featnum
B035-1094-015K

Rules for Using NULL as a Literal

The literal NULL can be used in the following ways.

  • As a CAST source operand, for example.
  •      CAST (NULL AS value)
  • As a CASE result, for example.
  •      CASE expression 
          THEN NULL
         END

    or

         CASE expression 
          THEN expression
          ELSE NULL 
         END
  • As an item specifying a null is to be placed in a column on INSERT or UPDATE.
  • As a default column definition specification, for example.
  •      DEFAULT NULL
  • As an explicit SELECT item, for example.
  •      SELECT NULL

    This usage is a Teradata extension to the ANSI/ISO SQL-2008 standard because it does not specify a FROM clause.

  • As an operand of a function, for example.
  •      SELECT TYPE(NULL)

    This usage is a Teradata extension to the ANSI/ISO SQL-2008 standard because it does not specify a FROM clause.