Oracle Database Maintenance Operations 4

Source: Internet
Author: User

--Add, modify, and delete constraints--1. Add Constraint ALTER TABLE tableAdd[constraint constraint]Constraint_type (column1[, Column2,...])[constraint_parameters];Alter TableBooks Modify Title not NULL;--add a non-null constraint--2. Modifying ConstraintsALTER TABLE TableMODIFY[CONSTRAINT CONSTRAINT][PRIMARY KEY]|[UNIQUE (column1[,column2,...])][constraint_parameters];--3. Renaming a constraintAlter Table TableRenameconstraintOld_name tonew_name;--4. Delete a constraintALTER TABLE Table    DROP[CONSTRAINT CONSTRAINT]    [PRIMARY KEY]|[UNIQUE (column1[,column2,...])]    [CASCADE][keep| DROP INDEX]SetConstraints AllDeferred--delay checking for all constraints that can be deferredSetConstraints AllImmediate--Restore all delay check constraints for immediate check--Query Constraint InformationAll_constraints--contains all constraint definition information that the current user can accessUser_constraints--contains definition information for all constraints owned by the current userDba_constraints--contains the definition information for all constraints in the current databaseAll_cons_columns--contains constraint column information that the current user can accessUser_cons_columns--contains information about constraint columns that are owned by the current userDba_cons_columns--contains information about all constraint columns for the current database

Oracle Database Maintenance Operations 4

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.