How to Disable All Constraints in Oracle

SQL databases such as Oracle allow administrators to establish guidelines requiring certain attributes about the database to always be true. These guidelines, called constraints, help maintain the integrity of the database, preventing the addition of corrupted or incomplete information that could cause errors in reports and queries. Sometimes, these constraints prevent the insertion of new tables or data. Learning how to disable all constraints in Oracle can increase your ability to manipulate your database.

Instructions

    • 1

      Run Oracle. Establish a connection with the database you wish to edit.

    • 2

      Type "SET CONSTRAINTS ALL DEFERRED;" without quotation marks at the top of your data manipulation language (DML) input window to disable all constraints for the entire database during the current transaction.

    • 3

      Click the tables for which you want to disable all constraints permanently. Type "alter table table_name DISABLE constraint all_constraints;" without quotation marks in your DML input window.

    • 4

      Click "Save" to update the database.

Learnify Hub © www.0685.com All Rights Reserved