Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.3.0 |  CUBRID 8.3.1 |  CUBRID 8.4.0 |  CUBRID 8.4.1 |  CUBRID 8.4.3 |  CUBRID 9.0.0 | 

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

  • table_name: Specifies the name of a table that has a constraint to be dropped.
  • constraint_name: Specifies the name of a constraint to be dropped.  
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;