Free 1Z0-071 Exam Braindumps

Pass your Oracle Database 12c SQL exam with these free Questions and Answers

Page 8 of 64
QUESTION 31

Which statement correctly grants a system privilege?

  1. A. GRANT CREATE VIEWON table1 TOuser1;
  2. B. GRANT ALTER TABLETO PUBLIC;
  3. C. GRANT CREATE TABLETO user1, user2;
  4. D. GRANT CREATE SESSIONTO ALL;

Correct Answer: C

QUESTION 32

View the exhibit and examine the ORDERS table. ORDERS
Name Null? Type
ORDER ID NOT NULL NUMBER(4) ORDATE DATE DATE CUSTOMER ID NUMBER(3) ORDER TOTAL NUMBER(7,2)
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?

  1. A. ALTER TABLE ordersMODIFY CONSTRAINT orders_cust_id_nn NOT NULL (customer_id);
  2. B. ALTER TABLE ordersADD CONSTRAINT orders_cust_id_nn NOT NULL (customer_id);
  3. C. ALTER TABLE ordersMODIFY customer_id CONSTRAINT orders_cust_nn NOT NULL (customer_id);
  4. D. ALTER TABLE ordersADD customer_id NUMBER(6)CONSTRAINT orders_cust_id_nn NOT NULL;

Correct Answer: C

QUESTION 33

Evaluate the following query:
SQL> SELECT TRUNC (ROUND (156.00, -1),-1) FROM DUAL;
What would be the outcome?

  1. A. 150
  2. B. 200
  3. C. 160
  4. D. 16
  5. E. 100

Correct Answer: C
References:
https://docs.oracle.com/cd/B19306_01/server.102/b14200/functions135.htm https://docs.oracle.com/cd/B28359_01/olap.111/b28126/dml_functions_2127.htm

QUESTION 34

View the exhibit and examine the structure of the SALES, CUSTOMERS, PRODUCTS and TIMES tables.
1Z0-071 dumps exhibit
The PROD_ID column is the foreign key in the SALES table referencing the PRODUCTS table.
The CUST_ID and TIME_ID columns are also foreign keys in the SALES table referencing the CUSTOMERS and TIMES tables, respectively.
Examine this command:
CREATE TABLE new_sales (prod_id, cust_id, order_date DEFAULT SYSDATE)
AS
SELECT prod_id, cust_id, time_id FROM sales;
Which statement is true?

  1. A. The NEW_SALES table would get created and all the FOREIGN KEY constraints defined on the selected columns from the SALES table would be created on the corresponding columns in the NEW_SALES table.
  2. B. The NEW_SALES table would not get created because the column names in the CREATE TABLE command and the SELECT clause do not match.
  3. C. The NEW_SALES table would not get created because the DEFAULT value cannot be specified in the column definition.
  4. D. The NEW_SALES table would get created and all the NOT NULL constraints defined on the selected columns from the SALES table would be created on the corresponding columns in the NEW_SALES table.

Correct Answer: D

QUESTION 35

View the Exhibit and examine the structure of the SALES and PRODUCTS tables. (Choose two.)
1Z0-071 dumps exhibit
In the SALES table, PROD_ID is the foreign key referencing PROD_ID in the PRODUCTS table. You must list each product ID and the number of times it has been sold.
Examine this query which is missing a JOIN operator: SQL > SELECT p.prod_id, count(s.prod_id)
FROM products p sales s ON p.prod_id = s.prod_id
GROUP BY p.prod_id;
Which two JOIN operations can be used to obtain the required output?

  1. A. FULL OUTER JOIN
  2. B. JOIN
  3. C. LEFT OUETR JOIN
  4. D. RIGHT OUTER JOIN

Correct Answer: AC

Page 8 of 64

Post your Comments and Discuss Oracle 1Z0-071 exam with other Community members: