Null - Teradata Database - Teradata Vantage NewSQL Engine

SQL Data Manipulation Language

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-03
dita:mapPath
fbo1512081269404.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval
dita:id
B035-1146
lifecycle
previous
Product Category
Teradata Vantage™

Purpose

Provides a method for including a blank line or self-contained comment within an SQL request, such as a multistatement request, macro, stored procedure, and so on.

Syntax



Syntax Elements

pad_character
Valid pad character, such as a SPACE character.
SQL_comment
Valid SQL comment string.

ANSI Compliance

Null statements, although closely related to the ANSI SQL concept of separators, are a Teradata extension to the ANSI SQL:2011 standard.

Required Privileges

None.

Invocation

Nonexecutable.

Definition: Null Statement

A statement that has no content except for optional pad characters or SQL comments.

Example: Null Statement

The semicolon in the following request is a null statement.

     /* This example shows a comment followed by
        a semicolon used as a null statement */
     ;  UPDATE Pay_Test SET ...

Example: Null Statement and Statement Separator

The first SEMICOLON in the following request is a null statement. The second SEMICOLON is taken as statement separator.

     /*    This example shows a semicolon used as a null
           statement and as a statement separator */
           ;  UPDATE Payroll_Test SET Name = 'Wedgewood A'
              WHERE Name = 'Wedgewood A'
           ;  SELECT ...
     -- This example shows the use of an ANSI component
     -- used as a null statement and statement separator ;

Example: Single Null Statement

A SEMICOLON that precedes the first or only statement of a request is taken as a null statement.

     ; DROP TABLE temp_payroll;