1Z0-052 · Question #20
You execute this command to drop the ITEM table, which has the primary key referred in the ORDERS table: SQL> DROP TABLE scott.item CASCADE CONSTRAINTS PURGE; Which two statements are true about the…
The correct answer is A. No flashback is possible to bring back the ITEM table. D. The dependent referential integrity constraints in the ORDERS table are removed. DROP TABLE with CASCADE CONSTRAINTS PURGE permanently deletes the table and removes all dependent foreign key constraints in child tables, bypassing the recycle bin so flashback recovery is impossible.
Question
You execute this command to drop the ITEM table, which has the primary key referred in the ORDERS table:
SQL> DROP TABLE scott.item CASCADE CONSTRAINTS PURGE; Which two statements are true about the effect of the command? (Choose two.)
Options
- ANo flashback is possible to bring back the ITEM table.
- BThe ORDERS table is dropped along with the ITEM table.
- CThe dependent referential integrity constraints in the ORDERS table are disabled.
- DThe dependent referential integrity constraints in the ORDERS table are removed.
- EThe table definition of the ITEM table and associated indexes are placed in the recycle bin.
How the community answered
(48 responses)- A71% (34)
- B4% (2)
- C8% (4)
- E17% (8)
Why each option
DROP TABLE with CASCADE CONSTRAINTS PURGE permanently deletes the table and removes all dependent foreign key constraints in child tables, bypassing the recycle bin so flashback recovery is impossible.
The PURGE clause causes the table to be immediately and permanently removed without being placed in the recycle bin, which means no FLASHBACK TABLE operation can recover the ITEM table after the command completes.
CASCADE CONSTRAINTS only removes the dependent foreign key constraints from the ORDERS table; it does not drop the ORDERS table itself, which remains fully intact.
CASCADE CONSTRAINTS removes (drops) the dependent referential integrity constraints entirely from the ORDERS table; it does not merely disable them, as disabling would leave the constraint definition in place.
The CASCADE CONSTRAINTS clause permanently drops all referential integrity constraints in other tables - such as the foreign key in ORDERS referencing ITEM's primary key - completely removing those constraint definitions from the data dictionary.
The PURGE clause explicitly bypasses the recycle bin, so the ITEM table and its associated indexes are permanently destroyed and are never placed in the recycle bin.
Concept tested: DROP TABLE CASCADE CONSTRAINTS PURGE behavior in Oracle
Source: https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/DROP-TABLE.html
Topics
Community Discussion
No community discussion yet for this question.