Exam Code: 1Z0-047 (Practice Exam Latest Test Questions VCE PDF)
Exam Name: Oracle Database SQL Expert
Certification Provider: Oracle
Free Today! Guaranteed Training- Pass 1Z0-047 Exam.
2016 Apr 1Z0-047 Study Guide Questions:
Q21. View the Exhibit and examine the description of the EMPLOYEES table.
Your company decided to give a monthly bonus of $50 to all the employees who have completed five years in the company. The following statement is written to display the LAST_NAME,
DEPARTMENT_ID, and the total annual salary:
SELECT last_name, department_id, salary+50*12 "Annual Compensation" FROM employees WHERE MONTHS_BETWEEN(SYSDATE, hire_date)/12 >= 5;
When you execute the statement, the "Annual Compensation" is not computed correctly. What changes would you make to the query to calculate the annual compensation correctly?
A. Change the SELECT clause to SELECT last_name, department_id, salary*12+50 "Annual Compensation".
B. Change the SELECT clause to SELECT last_name, department_id, salary+(50*12) "Annual Compensation".
C. Change the SELECT clause to SELECT last_name, department_id, (salary +50)*12 "Annual Compensation".
D. Change the SELECT clause to SELECT last_name, department_id, (salary*12)+50 "Annual Compensation".
Q22. Which two statements are true regarding operators used with subqueries? (Choose two.
A. The NOT IN operator is equivalent to IS NULL
B. The <ANY operator means less than the maximum.
C. =ANY and =ALL operators have the same functionality.
D. The IN operator cannot be used in single-row subqueries.
E. TheNOT operator can be used with IN, ANY and ALL operators.
Q23. OE and SCOTT are the users in the database. The ORDERS table is owned by OE. Evaluate the statements issued by the DBA in the following sequence:
CREATE ROLE r1;
GRANT SELECT, INSERT ON oe. orders TO r1;
GRANT r1 TO scott;
GRANT SELECT ON oe. orders TO scott;
REVOKE SELECT ON oe.orders FROM scott;
What would be the outcome after executing the statements?
A. SCOTT would be able to query the OE.ORDERS table.
B. SCOTT would not be able to query the OE.ORDERS table.
C. The REVOKE statement would remove the SELECT privilege from SCOTT as well as from the role R1.
D. The REVOKE statement would give an error because the SELECT privilege has been granted to the role R1
Down to date 1z0-047 dumps pdf free download:
Q24. The user SCOTT who is the owner of ORDERS and ORDER_ITEMS tables issues the following
ON orders, order_items
What correction needs to be done to the above statement?
A. PUBLICshould bereplacedwithspecific usernames.
B. ALL should be replaced with a list of specific privileges.
C. WITH GRANTOPTIONshould beaddedto the statement.
D. Separate GRANT statements are required for ORDERSandORDER_ITEMS tables.
Q25. View the Exhibit and examine the descriptions of the DEPT and LOCATIONS tables.
You want to update the CITY column of the DEPT table for all the rows with the corresponding value in the CITY column of the LOCATIONS table for each department.
Which SOL statement would you execute to accomplish the task?
A. UPDATE deptd
B. UPDATE deptd
SET city=(SELECT city
FROM locations I)
WHERE d.location_id = l.location_id;
C. UPDATE dept d
FROM locations I
WHEREd.location_id = l.location_id);
D. UPDATE deptd SET city =ALL(SELECT city FROM locations I WHEREd.location_id = l.location_id);
Q26. View the Exhibit and examine the description of the PRODUCT_INFORMATION table.
SELECT product_name, list_price, min_price, list_price - min_price Difference FROM product_information
Which options when used with the above SQL statement can produce the sorted output in ascending order of the price difference between LIST_PRICE and MIN_PRICE? (Choose all that apply.)
B. ORDER BY MIN_PRICE
C. ORDER BY DIFFERENCE
D. ORDER BY LIST_PRICE
Breathing 1z0-047 dumps pdf:
Q27. View the Exhibit and examine the structure of the EMP table which is not partitioned and not an index-organized table.
Evaluate the following SQL statement:
ALTER TABLE emp DROP COLUMN first_name;
Which two statements are true regarding the above command? (Choose two.)
A. The FIRST_NAME column wouldbedropped provided it does notcontainany data.
B. The FIRST_NAME column would bedropped providedat least one or more columnsremain inthe table.
C. The FIRST_NAME column can be rolledback providedthe SET UNUSED option is added to the above SQL statement.
D. The FIRST_NAME column can be dropped evenif itis part ofacomposite PRIMARY KEY provided the CASCADE option is used.
Q28. View the Exhibit and examine the details of the PRODUCT_INFORMATION table.
You have the requirement to display PRODUCT_NAME and LIST_PRICE from the table where the CATEGORYJD column has values 12 or 13, and the SUPPLIER_ID column has the value 102088. You executed the following SQL statement:
SELECT product_name, list_price
WHERE (category_id = 12 AND category_id = 13) AND supplier_id = 102088;
Which statement is true regarding the execution of the query?
A. Itwould executebut theoutput would return no rows.
B. It would execute and the outputwould displaythedesired result.
C. It wouldnotexecute because the entireWHEREclause conditionisnot enclosedwithinthe parentheses.
D. Itwould not execute becausethesame column has been used in both sidesoftheANDlogical operatortoform the condition.
Q29. Which two statements are true? (Choose two.)
A. The USER_SYNONYMSviewcan provide information about private synonyms.
B. The user SYSTEM owns all the base tables and user-accessible views of the data dictionary.
C. All the dynamic performance views prefixed with V$ are accessible to all the database users.
D. The USER_OBJECTS view can provide information about the tables and views created by the user only.
E. DICTIONARY is a view thatcontains thenamesof allthe datadictionary views that theuser can access.
Q30. View the Exhibit and examine the structure of the ORDER_ITEMS table.
You need to display the ORDER_ID of the order that has the highest total value among all the orders in the ORDER_ITEMS table.
Which query would produce the desired output?
A. SELECT order_id
WHERE(unit_price*quantity) = MAX(unit_price*quantity)
GROUP BY order_id;
B. SELECT order_id
WHERE(unit_price*quantity) = (SELECT MAX(unit_price*quantity) FROM order_items)
GROUP BY order_id;
C. SELECT order_id
WHERE (unit_price*quantity) = (SELECT MAX(unit_price*quantity) FROM order_items
GROUP BY order_id);
D. SELECT order_id
GROUP BY order_id
HAVING SUM(unit_price*quantity) =(SELECT MAX(SUM(unit_price*quantity))
FROM order_items GROUP BY order_id);