Example: Adding a Column with an Unnamed CHECK Constraint - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

Add an unnamed CHECK constraint to make sure that values in column column_1 are greater than 0.

This example is valid only if there is not an existing unnamed column level CHECK for column_1 in table_1.

ALTER TABLE table_1 ADD CONSTRAINT column_1 CHECK (column_1 > 0);