nerdexam
Oracle

1Z0-071 · Question #76

1Z0-071 Question #76: Real Exam Question with Answer & Explanation

Sign in or unlock 1Z0-071 to reveal the answer and full explanation for question #76. The question stem and answer options stay visible for context.

Question

Examine the create table statements for the stores and sales tables. SQL> CREATE TABLE stores(store_id NUMBER(4) CONSTRAINT store_id_pk PRIMARY KEY, store_name VARCHAR2(12), store_address VARCHAR2(20), start_date DATE); SQL> CREATE TABLE sales(sales_id NUMBER(4) CONSTRAINT sales_id_pk PRIMARY KEY, item_id NUMBER(4), quantity NUMBER(10), sales_date DATE, store_id NUMBER(4), CONSTRAINT store_id_fk FOREIGN KEY(store_id) REFERENCES stores(store_id)); You executed the following statement: SQL> DELETE from stores WHERE store_id=900; The statement fails due to the integrity constraint error: ORA-02292: integrity constraint (HR.STORE_ID_FK) violated Which three options ensure that the statement will execute successfully?

Options

  • ADisable the primary key in the STORES table.
  • BUse CASCADE keyword with DELETE statement.
  • CDELETE the rows with STORE_ID = 900 from the SALES table and then delete rows from STORES
  • DDisable the FOREIGN KEY in SALES table and then delete the rows.
  • ECreate the foreign key in the SALES table on SALES_ID column with on DELETE CASCADE option.

Unlock 1Z0-071 to see the answer

You've previewed enough free 1Z0-071 questions. Unlock 1Z0-071 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Full 1Z0-071 Practice
Examine the create table statements for the stores and sales... | 1Z0-071 Q#76 Answer | NerdExam