What are the two effects of this command?

A constraint in a table is defined with the INITIALLY IMMEDIATE clause. You executed the
ALTER TABLE command with the ENABLE VALIDATE option to enable the constraint that
was disabled. What are the two effects of this command? (Choose two.)

A constraint in a table is defined with the INITIALLY IMMEDIATE clause. You executed the
ALTER TABLE command with the ENABLE VALIDATE option to enable the constraint that
was disabled. What are the two effects of this command? (Choose two.)

A.
It fails if any existing row violates the constraint.

B.
It does not validate the existing data in the table.

C.
It enables the constraint to be enforced at the end of each transaction.

D.
It prevents insert, update, and delete operations on the table while the constraint is in the
process of being enabled.



Leave a Reply 1

Your email address will not be published. Required fields are marked *


mostramistra

mostramistra

ENABLE and DISABLE affect only future data that will be added or modified in the table.
In contrast, the VALIDATE and NOVALIDATE keywords in the ALTER TABLE statement act on the existing data.
Therefore, a constraint can have four states:
ENABLE VALIDATE: This is the default for the ENABLE clause. The existing data in the table is validated to verify that it conforms to the constraint.
ENABLE NOVALIDATE: This does not validate the existing data but enables the constraint for future constraint checking.
DISABLE VALIDATE: The constraint is disabled (any index used to enforce the constraint is also dropped), but the constraint is kept valid. No DML operation is allowed on the table because future changes cannot be verified.
DISABLE NOVALIDATE: This is the default for the DISABLE clause. The constraint is disabled, and no checks are done on future or existing data.

Oracle does not allow any INSERT, UPDATE, or DELETE operations on a table with a DISABLE VALIDATE constraint. This is a quick way to make a table read-only in releases prior to Oracle 11g. In Oracle 11g, you can use the READ ONLY clause of the ALTER TABLE statement to make a table read-only.

ANSWER: A, D ( “the constraint is in the process of being enabled” So not enabled yet)