-152 THE DROP clause CLAUSE IN THE ALTER STATEMENT IS INVALID BECAUSE constraint-name IS A constraint-type
Explanation
The DROP clause of an ALTER TABLE statement tried to drop a constraint that does not match the constraint-type in the DROP clause. clause must identify an appropriate constraint-type as follows:
- REFERENTIAL CONSTRAINT
- The identified constraint must be a referential constraint.
- CHECK CONSTRAINT
- The identified constraint must be a check constraint.
- PRIMARY KEY CONSTRAINT
- The identified constraint must be a primary key constraint.
- UNIQUE KEY CONSTRAINT
- The identified constraint must be a unique key constraint.
System action
The ALTER TABLE DROP statement cannot be executed. No object was dropped.
Programmer response
Drop the existing object with the correct DROP clause of the ALTER TABLE statement.
SQLSTATE
42809