Examine the following statement that is used to modify the primary key constraint on the SALES table:
SQL> ALTER TABLE SALES MODIFY CONSTRAINT pk DISABLE VALIDATE;
Which three statements are true regarding the above command? (Choose three.)
A.
The constraint remains valid.
B.
The index on the constraint is dropped.
C.
It allows the loading of data into the table using SQL *Loader.
D.
New data conforms to the constraint, but existing data is not checked.
E.
It allows the data manipulation on the table using INSERT/UPDATE/DELETE SQL statements.
I keep finding this:
DISABLE VALIDATE disables the constraint, drops the index on the constraint, and disallows any modification of the constrained columns.
So how can A be true.
Please explain how B can be correct. If the Index should be dropped shulden it need a cascade like this
ALTER TABLE sales DROP CONSTRAINT pk CASCADE;
From Oracle documentation:
“DISABLE Clause …..
DISABLE VALIDATE disables the constraint and drops the index on the constraint, but keeps the constraint valid. ”
http://docs.oracle.com/cd/B28359_01/server.111/b28286/clauses002.htm#SQLRF01111
I’m still not sure how Oracle is able to enforce uniqueness without the index.
You cannot insert new records.
The extract from the above Oracle doc.
DISABLE VALIDATE disables the constraint and drops the index on the constraint, but keeps the constraint valid. This feature is most useful in data warehousing situations, because it lets you load large amounts of data while also saving space by not having an index. This setting lets you load data from a nonpartitioned table into a partitioned table using the exchange_partition_clause of the ALTER TABLE statement or using SQL*Loader. All other modifications to the table (inserts, updates, and deletes) by other SQL statements are disallowed.