Drop Clause: Constraints
- Last Updated: May 15, 2020
- 1 minute read
- DataDirect Connectors
- JDBC
- IBM Db2 5.1
- MySQL 5.1
- Progress OpenEdge 5.1
- SAP Sybase 5.1
- Documentation
Purpose
Drops a constraint from an existing table. It is optional.
Syntax
DROP {[CONSTRAINT] constraint_name}
where:
- constraint_name
- specifies an existing constraint.
Notes
- The specified constraint cannot be a primary key constraint or unique constraint.
Example
This example drops the test_fk constraint.
ALTER TABLE test DROP CONSTRAINT test_fk