DROP CONSTRAINT Clause

Description

You can drop the constraints pre-defined for the table, such as UNIQUE, PRIMARY KEY and FOREIGN KEY by using the DROP CONSTRAINT clause. In this case, you must specify a constraint name. You can check these names by using the CSQL command (;schema table_name).

Syntax

ALTER [ TABLE | CLASS ] table_name

DROP CONSTRAINT constraint_name

Example

ALTER TABLE a_tbl DROP CONSTRAINT pk_a_tbl_id;

ALTER TABLE a_tbl DROP CONSTRAINT fk_a_tbl_id;

ALTER TABLE a_tbl DROP CONSTRAINT u_a_tbl_id;