Oracle Tutorial

What is Oracle
SQL Keywords

Oracle Wildcards

Oracle Wildcards

Oracle Aliases

Oracle Aliases

MySQL Tutorial

MySQL Tutorial

PL/SQL Tutorial

PL/SQL Tutorial

Oracle Interview Questions

Oracle Interview Questions and Answers


Oracle Disable PRIMARY KEY Constraint

In Oracle, sometimes you may need to DISABLE PRIMARY KEY constraint, you use the following DISABLE PRIMARY KEY statement to disable primary key.

Oracle Disable PRIMARY KEY Constraint example

The following Oracle, Disable primary key using DISABLE PRIMARY KEY in "tblCustomer" table:

Example

ALTER TABLE tblCustomer
DISABLE PRIMARY KEY;

OR

ALTER TABLE tblCustomer
DISABLE CONSTRAINT pk_customrer;

Note:

In the above example, we are disabling primary key in "tblCustomer" table using DISABLE PRIMARY KEY constraint.