--Querying table InformationXxx_tables--contains basic descriptive and statistical information for a tableXxx_tab_columns--contains descriptive and statistical information for the columns in the tableXxx_all_tables--contains all the relationship tables and object table information for the current databaseXxx_tab_comments--contains comment information for all tables and viewsXxx_col_comments--contains column comment information for all tables and viewsXxx_tab_statistics--include all tables and statisticsXxx_tab_col_statistics--contains statistics for columns in all tablesXxx_encrypted_columns--contains information about encrypted columns in a table and encryption algorithm informationXxx_unused_col_tabs--contains unused column information in all tables--where xxx is DBA, all, user--How constraints are defined--1. Column-level constraintsColumn_definition[constraint constraint_name]Constraint_type ...--2. Table-level constraints[constraint constraint_name]Constraint_type (column1[, Column1,...]) ...--state of the constraintEnable--ActivateDisable--DisabledValidate--constraining checks for existing records in a tableNovalidate--No constraint checks are made on the records that are already in the table. --Create and maintain constraints--1. Defining constraints using column-level constraintsconstraint constraint--constraint name, if the user does not name the constraint, Oracle will automatically name the constraint and the style is SYS_CN, where n is the unique number of the database object. [[ not]NULL]|[Unique]|[PRIMARY Key]|[Check (condition)] [References[schema.]Object[(column)] [On Delete cascade| [Set NULL]]--defines a foreign key constraint for cascading deletions. ] [[Not deferrable]|--constraints are not deferred, default values. [the deferrable--constraint can delay an immediate check of the [initially immediate|--delay constraint. Deferred]--Deferred check for deferred constraints ] ] [enable|disable] [validate|novalidate] [using index Index_clause]--sets the parameters for a unique index that is automatically created when a primary KEY constraint or uniqueness constraint is defined. [exceptions Into[schema.]Table]--saves the record that violates the integrity constraint to the specified table. --2. Defining constraints using Table-level constraintsconstraint constraint [unique (column1[,column2 ...])] [primary KEY (Column1[,column2 ...])] [Check (condition)] [foreign key (Column1[,column2 ...]) References[schema.]Object[(Column[,column2 ...])] [On Delete cascade| [Set NULL]] ] [[Not deferrable]|--constraints are not deferred, default values. [deferrable--constraints can be delayed [initially immediate]|--an immediate check for deferred constraints. Deferred--Delay Check for deferred constraint s ] [enable|disable][validate|novalidate] [using index Index_clause] [exceptions Into[schema.]Table]
Oracle Database Maintenance Operations 3