1Z0-071 | The Renew Guide To 1Z0-071 vce


Q1. View the Exhibit and examine the structure of the stores table.

You want to display the name of the store along with the address, START_DATE, PROPERTV_PRICE, and the projected property price, which is 115% of the property price. The stores displayed must have START_DATE in the range of 36 months starting from 01- Jan-2000 and above.

Which SQL statement would get the desired output? 

A)

B)

C)

D)

A. Option A

B. Option B

C. Option C

D. Option D

Answer: C

Q2. Evaluate the following ALTER TABLE statement:

ALTER TABLE orders SET UNUSED order_date;

Which statement is true?

A. The DESCRIBE command would still display the ORDER_DATE column.

B. ROLLBACK can be used to get back the ORDER_DATE column in the ORDERS table.

C. The ORDER_DATE column should be empty for the ALTER TABLE command to execute successfully.

D. After executing the ALTER TABLE command, you can add a new column called ORDER_DATE to the ORDERS table.

Answer: D

Q3. You execute the following commands:

For which substitution variables are you prompted for the input?

A. None, because no input required

B. Both the substitution variables 'hiredate' and 'mgr_id

C. Only 'hiredate'

D. Only 'mgr_id'

Answer: B

Q4. View the Exhibit and examine the ORDERS table.

The ORDERS table contains data and all orders have been assigned a customer ID. Which statement would add a NOT NULL constraint to the CUSTOMER_ID column?

A. ALTER TABLE orders

ADD CONSTRAINT orders_cust_id_nn NOT NULL (customer_id);

B. ALTER TABLE orders

MODIFY customer_id CONSTRAINT orders_cust_id_nn NOT NULL;

C. ALTER TABLE orders

MODIFY CONSTRAINT orders_cust_id_nn NOT NULL (customer_id);

D. ALTER TABLE orders

ADD customer_id NUMBER(6)CONSTRAINT orders_cust_id_nn NOT NULL;

Answer: B

Q5. View the Exhibits and examine the structures of the costs and promotions tables? 

/1.

/2.

Evaluate the following SQL statement: SQL> SELECT prod_id FROM costs

WHERE promo_id IN (SELECT promo_id FROM promotions WHERE promo_cost < ALL

(SELECT MAX(promo_cost) FROM promotions GROUP BY (promo_end_datepromo_begin_date)));

What would be the outcome of the above SQL statement?

A. It displays prod IDs in the promo with the lowest cost.

B. It displays prod IDs in the promos with the lowest cost in the same time interval.

C. It displays prod IDs in the promos with the highest cost in the same time interval.

D. It displays prod IDs in the promos with cost less than the highest cost in the same time interval.

Answer: D

Q6. See the Exhibit and Examine the structure of the CUSTOMERS table:

Using the CUSTOMERS table, you need to generate a report that shows an increase in the credit limit by 15% for all customers. Customers whose credit limit has not been entered should have the message "Not Available" displayed.

Which SQL statement would produce the required result?

A. SELECT NVL(cust_credit_limit,'Not Available')*.15 "NEW CREDIT" FROM customers;

B. SELECT NVL(cust_credit_limit*.15,'Not Available') "NEW CREDIT" FROM customers;

C. SELECT TO_CHAR(NVL(cust_credit_limit*.15,'Not Available')) "NEW CREDIT" FROM customers;

D. SELECT NVL(TO_CHAR(cust_credit_limit*.15),'Not Available') "NEW CREDIT" FROM customers;

Answer:

Explanation: NVL Function

Converts a null value to an actual value:

Data types that can be used are date, character, and number. Data types must match:

– NVL(commission_pct,0)

– NVL(hire_date,'01-JAN-97')

– NVL(job_id,'No Job Yet')

Q7. Which statement correctly grants a system privilege?

A. GRANT EXECUTE

ON prod

TO PUBLIC;

B. GRANT CREATE VIEW

ON tablel TO used;

C. GRANT CREATE TABLE

TO used ,user2;

D. GRANT CREATE SESSION TO ALL;

Answer: C

Q8. Which two tasks can be performed by using Oracle SQL statements?

A. changing the password for an existing database

B. connecting to a database instance

C. querying data from tables across databases

D. starting up a database instance

E. executing operating system (OS) commands in a session

Answer: C,E

Q9. Which statements are true regarding the WHERE and HAVING clauses in a SELECT statement?

(Choose all that apply.)

A. The HAVING clause can be used with aggregate functions in subqueries.

B. The WHERE clause can be used to exclude rows after dividing them into groups.

C. The WHERE clause can be used to exclude rows before dividing them into groups.

D. The aggregate functions and columns used in the HAVING clause must be specified in the SELECT list of the query.

E. The WHERE and HAVING clauses can be used in the same statement only if they are applied to different columns in the table.

Answer: A,C

Q10. Evaluate the following SQL statements that are issued in the given order:

CREATE TABLE emp

(emp_no NUMBER(2) CONSTRAINT emp_emp_no_pk PRIMARY KEY, enameVARCHAR2(15),

salary NUMBER(8,2),

mgr_no NUMBER(2) CONSTRAINT emp_mgr_fk REFERENCES emp);

ALTER TABLE emp

DISABLE CONSTRAINT emp_emp_no_pk CASCADE; ALTER TABLE emp

ENABLE CONSTRAINT emp_emp_no_pk;

What would be the status of the foreign key EMP_MGR_FK?

A. It would be automatically enabled and deferred.

B. It would be automatically enabled and immediate.

C. It would remain disabled and has to be enabled manually using the ALTER TABLE command.

D. It would remain disabled and can be enabled only by dropping the foreign key constraint and re-creating it.

Answer: A,B,D