16.10 - Null Statements - Teradata Database

Teradata Database SQL Fundamentals

Product
Teradata Database
Release Number
16.10
Published
June 2017
Language
English (United States)
Last Update
2018-04-25
dita:mapPath
klx1480972732157.ditamap
dita:ditavalPath
changebar_rev_16_10_exclude_audience_ie.ditaval

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

Example: Using a Semicolon as a 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: Using Semicolons as Null Statements and Statement Separators

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: Using a Semicolon that Precedes the Statement

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

   ;DROP TABLE temp_payroll;