Example: Trying to Add and Drop Constraints in the Same Statement - 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

The following request is not valid because you can add or drop only one constraint per ALTER TABLE request:

    ALTER TABLE table_1
      DROP CONSTRAINT check_1,
      ADD CONSTRAINT check_2 CHECK (column_2 > 0);

The system returns the following message:

     Only a check specification is allowed for the modification.