SQLRestrictedWords View | SQL Fundamentals | VantageCloud Lake - SQLRestrictedWords View - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

The SQLRestrictedWords view lists all restricted words for the current database release.

SQLRestrictedWords is created in the SYSLIB database by the DIPDEM script, which is run automatically by the DIP utility when Analytics Database is installed.

The view contains these columns:

Column Name Description
restricted_word Restricted word. Cannot be an identifier.
category Word likely to be used as database keyword. Cannot be an identifier.
ANSI_restricted One of the following characters that represents the category of the Teradata-restricted word:
  • R: a Teradata-reserved word
  • F: a Teradata future reserved word
  • N: a Teradata-nonreserved word

Usage Notes

Queries of SQLRestrictedWords are case-specific.

Example: Getting the Restricted Words for the Current Release

This query returns the restricted words for the current database release and their Teradata and ANSI categories:

SELECT * FROM SYSLIB.SQLRestrictedWords;

Partial output:

restricted_word                 category  ANSI_restricted
------------------------------  --------  ---------------
ABORT                           R         T
ABORTSESSION                    R         T
ABS                             R         R
ACCESS_LOCK                     R         T
...                             ...       ...

Example: Getting Nonreserved Words that are ANSI Reserved Words

The following query returns the nonreserved words for the current database release that are ANSI-reserved words. A portion of the output follows.

This result is useful because Teradata does not recommend using nonreserved words as identifiers if these words are reserved words in the ANSI standard. These words may become reserved words.
SELECT restricted_word
FROM SYSLIB.SQLRestrictedWords
WHERE category=’N’ AND ANSI_restricted=’R’;
restricted_word
------------------------------
ALLOCATE
CALLED
CONDITION
GLOBAL
MEMBER
...

Related Information

To retrieve or query Teradata SQL restricted words from database releases other than the current release, see SQLRestrictedWords_TBF Function.