Oracle Database SQL - 1z0-071 Exam Practice Test
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?
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?
Correct Answer: B,C,D
Vote an answer
Examine the structure of the EMPLOYEES table.

You must display the details of employees who have manager with MANAGER_ID 100, who were hired in the past 6 months and who have salaries greater than 10000.
Which query would retrieve the required result?

You must display the details of employees who have manager with MANAGER_ID 100, who were hired in the past 6 months and who have salaries greater than 10000.
Which query would retrieve the required result?
Correct Answer: C
Vote an answer
Which two statements are true about the SET VERIFY ON command? (Choose two.)
Correct Answer: A,D
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).
You must create a table EMPLOYEES in which the values in the columns EMPLOYEES_ID and LOGIN_ID must be unique and not null.
Which two SQL statements would create the required table? (Choose two.)
Which two SQL statements would create the required table? (Choose two.)
Correct Answer: A,E
Vote an answer
View the Exhibit and examine the description of the EMPLOYEEStable.

Evaluate the following SQL statement:
SELECT first_name, employee_id, NEXT_DAY(ADD_MONTHS(hire_date, 6), 1)
"Review" FROM employees;
The query was written to retrieve the FIRST_NAME, EMPLOYEE_ID,and review date for employees. The review date is the firsts Monday after the completion of six months of the hiring.
The NLS_TERRITORYparameter is set to AMERICAin the session.
Which statement is true regarding this query?

Evaluate the following SQL statement:
SELECT first_name, employee_id, NEXT_DAY(ADD_MONTHS(hire_date, 6), 1)
"Review" FROM employees;
The query was written to retrieve the FIRST_NAME, EMPLOYEE_ID,and review date for employees. The review date is the firsts Monday after the completion of six months of the hiring.
The NLS_TERRITORYparameter is set to AMERICAin the session.
Which statement is true regarding this query?
Correct Answer: B
Vote an answer
Which two statements are true regarding the WHERE and HAVING clauses in a SELECT statement? (Choose two.)
Correct Answer: B,C
Vote an answer
Examine the description of the TRANSACTIONS table:

Which two SQL statements execute successfully? (Choose two.)

Which two SQL statements execute successfully? (Choose two.)
Correct Answer: B,E
Vote an answer
Which three statements indicate the end of a transaction? (Choose three.)
Correct Answer: C,D,E
Vote an answer
Examine the structure of the BOOKS_TRANSACTIONStable.

You want to update this table such that BOOK_IDis set to 'INVALID'for all rows where no MEMBER_ID has been entered.
Examine this partial SQL statement:

Which condition must be used in the WHEREclause to perform the required update?

You want to update this table such that BOOK_IDis set to 'INVALID'for all rows where no MEMBER_ID has been entered.
Examine this partial SQL statement:

Which condition must be used in the WHEREclause to perform the required update?
Correct Answer: D
Vote an answer