17.10 - Example: Specifying Column-Level Named CHECK Constraints - 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)

The request in this example names constraints at the column level.

    CREATE TABLE good_1 (
      column_1 INTEGER NOT NULL
       CONSTRAINT primary_1 PRIMARY KEY,
      column_2 INTEGER NOT NULL
       CONSTRAINT unique_1 UNIQUE,
      column_3 INTEGER
       CONSTRAINT check_1 CHECK (column_3 > 0);