nerdexam
Oracle

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.

Managing Schema Objects

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)
  • A
    71% (34)
  • B
    4% (2)
  • C
    8% (4)
  • E
    17% (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.

ANo flashback is possible to bring back the ITEM table.Correct

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.

BThe ORDERS table is dropped along with the ITEM table.

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.

CThe dependent referential integrity constraints in the ORDERS table are disabled.

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.

DThe dependent referential integrity constraints in the ORDERS table are removed.Correct

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.

EThe table definition of the ITEM table and associated indexes are placed in the recycle bin.

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

#DROP TABLE#CASCADE CONSTRAINTS#PURGE#referential integrity

Community Discussion

No community discussion yet for this question.

Full 1Z0-052 Practice