CREATE ERROR TABLE SQL Statement | Teradata Vantage - 17.10 - CREATE ERROR TABLE - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1144-171K
Language
English (United States)

Defines the name and containing database of a new error table and specifies the name of the associated data table.

The associated data table can be a foreign table. By default, the maximum number of errors logged for a foreign table is 10. To specify a different maximum, use the DBS Control setting ForeignTableErrorsLimit, described in Teradata Vantage™ - Database Utilities, B035-1102.

If the associated data table is column-partitioned, Vantage creates the error table as it would for a non-column-partitioned table except that the error table is a NoPI table without partitioning.

ANSI Compliance

This statement is a Teradata extension to the ANSI SQL:2011 standard.

Other SQL dialects support similar non-ANSI standard statements with names such as START VIOLATIONS TABLE.

Required Privileges

You must have the CREATE TABLE privilege on the database or user in which the error table is created.

To access an error table that contains UDT columns, you must have at least one of the following privileges:

  • UDTUSAGE on the specified UDT
  • UDTUSAGE on the SYSUDTLIB database
  • UDTTYPE on the SYSUDTLIB database
  • UDTMETHOD on the SYSUDTLIB database

Privileges Granted Automatically

The creator receives all the following privileges on the newly created error table:

  • DELETE
  • DROP TABLE
  • INSERT
  • SELECT
  • UPDATE