1z0-051

Page 1

Oracle 1z0-051 Oracle Database: SQL Fundamentals I 10 Q&A

Version 3.0


Important Note, Please Read Carefully Other prep2pass products A) Offline Testing engine Use the offline Testing engine product topractice the questions in an exam environment. Build a foundation of knowledge which will be useful also after passing the exam. Latest Version We are constantly reviewing our products. New material is added and old material is revised. Free updates are available for 90 days after the purchase. You should check your member zone at prep2pass and update 3-4 days before the scheduled exam date. Here is the procedure to get the latest version: 1.Go towww.prep2pass.com 2.Click on Log in 3.The latest versions of all purchased products are downloadable from here. Just click the links. For most updates,it is enough just to print the new questions at the end of the new version, not the whole document. Feedback If you spot a possible improvement then please let us know. We always interested in improving product quality. Feedback should be send to feedback@prep2pass.com. You should include the following: Exam number, version, page number, question number, and your login Email. Our experts will answer your mail promptly. Copyright Each iPAD file is a green exe file. if we find out that a particular iPAD Viewer file is being distributed by you, prep2pass reserves the right to take legal action against you according to the International Copyright Laws. Explanations This product does not include explanations at the moment. If you are interested in providing explanations for this exam, please contact feedback@prep2pass.com.

Leading the way in IT testing and certification tools, www.Prep2Pass.com Demo

-2-


www.prep2pass.com Q: 1 See the Exhibit: You need to display all promo categories that do not have 'discount' in their subcategory. Which two SQL statements give the required result? (Choose two.)

A. SELECT promo_category FROM promotions MINUS SELECT promo_category FROM promotions WHERE promo_subcategory = 'discount' B. SELECT promo_category FROM promotions INTERSECT SELECT promo_category FROM promotions Leading the way in IT testing and certification tools, www.Prep2Pass.com Demo

-3-


WHERE promo_subcategory = 'discount' C. SELECT promo_category FROM promotions MINUS SELECT promo_category FROM promotions WHERE promo_subcategory <> 'discount' D. SELECT promo_category FROM promotions INTERSECT SELECT promo_category FROM promotions WHERE promo_subcategory <> 'discount'

Answer: A, D www.prep2pass.com Q: 2 Which two statements are true regarding views? (Choose two.)

A. A subquery that defines a view cannot include the GROUP BY clause B. A view is created with the subquery having the DISTINCT keyword can be updated C. A view that is created with the subquery having the pseudo column ROWNUM keyword cannot be updated D. A Data Manipulation Language (DML) operation can be performed on a view that is created with the subquery having all the NOT NULL columns of a table

Answer: C, D www.prep2pass.com Q: 3 When does a transaction complete? (Choose all that apply.)

Leading the way in IT testing and certification tools, www.Prep2Pass.com Demo

-4-


A. When a DELETE statement is executed B. When a ROLLBACK command is executed C. When a PL/SQL anonymous block is executed D. When a data definition language statement is executed E. When a TRUNCATE statement is executed after the pending transaction

Answer: B, D, E www.prep2pass.com Q: 4 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" Leading the way in IT testing and certification tools, www.Prep2Pass.com Demo

-5-


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: D www.prep2pass.com Q: 5 See the Exhibit and examine the structure of the CUSTOMERS table: Using the CUSTOMERS table, you need to generate a report that shown the average credit limit for customers in WASHINGTON and NEW YORK. Which SQL statement would produce the required result?

A. SELECT cust_city,AVG(cust_credit_limit) FROM customers WHERE cust_city IN ('WASHINGTON','NEW YORK') GROUP BY cust_credit_limit,cust_city; B. SELECT cust_city,AVG(cust_credit_limit) FROM customers WHERE cust_city IN ('WASHINGTON','NEW YORK') Leading the way in IT testing and certification tools, www.Prep2Pass.com Demo

-6-


GROUP BY cust_city,cust_credit_limit; C. SELECT cust_city,AVG(cust_credit_limit) FROM customers WHERE cust_city IN ('WASHINGTON','NEW YORK') GROUP BY cust_city; D. SELECT cust_city,AVG(NVL(cust_credit_limit,0)) FROM customers WHERE cust_city IN ('WASHINGTON','NEW YORK')

Answer: C www.prep2pass.com Q: 6 See the Exhibit: and examine the structure of CUSTOMRS AND SALES tables: Evaluate the following SQL statement: Which statement is true regarding the execution of the above UPDATE statement?

Leading the way in IT testing and certification tools, www.Prep2Pass.com Demo

-7-


A. It would not execute because two tables cannot be used in a single UPDATE statement

Leading the way in IT testing and certification tools, www.Prep2Pass.com Demo

-8-


B. It would not execute because the SELECT statement cannot be used in place of the table name C. It would execute and restrict modifications to only the column specified in the SELECT statement D. It would not execute because a subquery cannot be used in the WHERE clause of an UPDATE statement

Answer: C www.prep2pass.com Q: 7 Which three SQL statements would display the value 1890.55 as $1,890.55? (Choose three.)

A. SELECT TO_CHAR(1890.55,'$0G000D00') FROM DUAL; B. SELECT TO_CHAR(1890.55,'$9,999V99') FROM DUAL; C. SELECT TO_CHAR(1890.55,'$9,999D99') FROM DUAL; D. SELECT TO_CHAR(1890.55,'$99G999D00') FROM DUAL; E. SELECT TO_CHAR(1890.55,'$99G999D99') FROM DUAL;

Answer: A, D, E www.prep2pass.com Q: 8 Where can subqueries be used? (Choose all that apply)

A. Field names in the SELECT statement

Leading the way in IT testing and certification tools, www.Prep2Pass.com Demo

-9-


B. The FROM clause in the SELECT statement C. The HAVING clause in the SELECT statement D. The GROUP BY clause in the SELECT statement E. The WHERE clause in only the SELECT statement F. The WHERE clause in the SELECT as well as all DML statements

Answer: A, B, C, F www.prep2pass.com Q: 9 The ORDERS TABLE belongs to the user OE. OE has granted the SELECT privilege on the ORDERS table to the user HR. Which statement would create a synonym ORD so that HR can execute the following query successfully? SELECT * FROM ord;

A. CREATE SYNONYM ord FOR orders; This command is issued by OE B. CREATE PUBLIC SYNONYM ord FOR orders; This command is issued by OE C. CREATE SYNONYM ord FOR oe.orders; This command is issued by the database administrator D. CREATE PUBLIC SYNONY ord FOR oe.orders; This command is issued by the database administrator

Answer: D www.prep2pass.com Q: 10 You need to display the date 11-Oct-2007 in words as 'Eleventh of October, Two Thousand Seven. Which SQL statement would give the required result?

A. SELECT TO_CHAR('11-oct-2007','fmDspth "of" Month, Year') Leading the way in IT testing and certification tools, www.Prep2Pass.com Demo

- 10 -


FROM DUAL; B. SELECT TO_CHAR(TO_DATE('11-oct-2007'),'fmDspth of Month, Year') FROM DUAL; C. SELECT TO_CHAR(TO_DATE('11-oct-2007'),'fmDspth "of" Month, Year') FROM DUAL; D. SELECT TO_DATE(TO_CHAR('11-oct-2007','fmDspth "of" Month, Year')) FROM DUAL;

Answer: C

Leading the way in IT testing and certification tools, www.Prep2Pass.com Demo

- 11 -


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.