Examcollection 1z0 051 dumps Questions are updated and all 1z0 051 dumps answers are verified by experts. Once you have completely prepared with our 1z0 051 dumps pdf exam prep kits you will be ready for the real 1z0 051 dumps pdf exam without a problem. We have Most up-to-date Oracle 1z0 051 practice test dumps study guide. PASSED 1z0 051 dumps First attempt! Here What I Did.


♥♥ 2021 NEW RECOMMEND ♥♥

Free VCE & PDF File for Oracle 1Z0-051 Real Exam (Full Version!)

★ Pass on Your First TRY ★ 100% Money Back Guarantee ★ Realistic Practice Exam Questions

Free Instant Download NEW 1Z0-051 Exam Dumps (PDF & VCE):
Available on: http://www.surepassexam.com/1Z0-051-exam-dumps.html

Q141. - (Topic 1) 

View the Exhibit and examine the structure of the PROMOTIONS table. 

Using the PROMOTIONS table, you need to find out the names and cost of all the promos done on 'TV' and 'internet' that ended in the time interval 15th March '00 to 15th October '00. 

Which two queries would give the required result? (Choose two.) 

A. SELECT promo_name, promo_cost FROM promotions WHERE promo_category IN ('TV', 'internet') AND promo_end_date BETWEEN '15-MAR-00' AND '15-OCT-00' 

B. SELECT promo_name, promo_cost FROM promotions WHERE promo_category = 'TV' OR promo_category ='internet' AND promo_end_date >='15-MAR-00' OR promo_end_date <='15-OCT-00' 

C. SELECT promo_name, promo_cost FROM promotions WHERE (promo_category BETWEEN 'TV' AND 'internet') AND (promo_end_date IN ('15-MAR-00','15-OCT-00')); 

D. SELECT promo_name, promo_cost FROM promotions WHERE (promo_category = 'TV' OR promo_category ='internet') AND (promo_end_date >='15-MAR-00' AND promo_end_date <='15-OCT-00'); 

Answer: A,D 


Q142. - (Topic 2) 

The CUSTOMERS table has these columns: 

The CUSTOMER_ID column is the primary key for the table. 

You need to determine how dispersed your customer base is. 

Which expression finds the number of different countries represented in the CUSTOMERS table? 

A. COUNT(UPPER(country_address)) 

B. COUNT(DIFF(UPPER(country_address))) 

C. COUNT(UNIQUE(UPPER(country_address))) 

D. COUNT DISTINCT UPPER(country_address) 

E. COUNT(DISTINCT (UPPER(country_address))) 

Answer:


Q143. - (Topic 1) 

Which SQL statement displays the date March 19, 2001 in a format that appears as “Nineteenth of March 2001 12:00:00 AM”? 

A. SELECT TO_CHAR(TO_DATE('19-Mar-2001’, ‘DD-Mon-YYYY’), ‘fmDdspth “of” Month YYYY fmHH:MI:SS AM’) NEW_DATE FROM dual; 

B. SELECT TO_CHAR(TO_DATE(’19-Mar-2001’, ‘DD-Mon-YYYY’), ‘Ddspth “of” Month YYYY fmHH:MI:SS AM’) NEW_DATE FROM dual; 

C. SELECT TO_CHAR(TO_DATE(’19-Mar-2001’, ‘DD-Mon-YYYY’), ‘fmDdspth “of” Month YYYY HH:MI:SS AM’) NEW_DATE FROM dual; 

D. SELECT TO_CHAR(TO_DATE(’19-Mar-2001’, ‘DD-Mon-YYYY), ‘fmDdspth “of” Month YYYYfmtHH:HI:SS AM') NEW_DATE FROM dual; 

Answer:


Q144. - (Topic 1) 

The following data exists in the PRODUCTS table: PROD_ID PROD_LIST_PRICE 

123456 152525.99 

You issue the following query: 

SQL> SELECT RPAD(( ROUND(prod_list_price)), 10,'*') 

FROM products 

WHERE prod_id = 123456; 

What would be the outcome? 

A. 152526**** 

B. **152525.99 

C. 152525** 

D. an error message 

Answer:

Explanation: 

The LPAD(string, length after padding, padding string) and RPAD(string, length after padding, padding string) functions add a padding string of characters to the left or right of a string until it reaches the specified length after padding. 


Q145. - (Topic 1) 

View the Exhibit and examine the structure of ORD and ORD_ITEMS tables. 

The ORD_NO column is PRIMARY KEY in the ORD table and the ORD_NO and ITEM_NO 

columns are composite PRIMARY KEY in the ORD_ITEMS table. 

Which two CREATE INDEX statements are valid? (Choose two.) 

A. CREATE INDEX ord_idx1 

ON ord(ord_no); 

B. CREATE INDEX ord_idx2 

ON ord_items(ord_no); 

C. CREATE INDEX ord_idx3 

ON ord_items(item_no); 

D. CREATE INDEX ord_idx4 

ON ord,ord_items(ord_no, ord_date,qty); 

Answer: B,C 

Explanation: How Are Indexes Created? 

You can create two types of indexes. 

Unique index: The Oracle server automatically creates this index when you define a 

column in a table to have a PRIMARY KEY or a UNIQUE constraint. The name of the index 

is the name that is given to the constraint. 

Nonunique index: This is an index that a user can create. For example, you can create 

the FOREIGN KEY column index for a join in a query to improve the speed of retrieval. 

Note: You can manually create a unique index, but it is recommended that you create a 

unique constraint, which implicitly creates a unique index. 


Q146. - (Topic 2) 

Examine the structure of the SHIPMENTS table: 

You want to generate a report that displays the PO_ID and the penalty amount to be paid if 

the 

SHIPMENT_DATE is later than one month from the PO_DATE. The penalty is $20 per day. 

Evaluate the following two queries: 

Which statement is true regarding the above commands? 

A. Both execute successfully and give correct results. 

B. Only the first query executes successfully but gives a wrong result. 

C. Only the first query executes successfully and gives the correct result. 

D. Only the second query executes successfully but gives a wrong result. 

E. Only the second query executes successfully and gives the correct result. 

Answer:

Explanation: 

The MONTHS_BETWEEN(date 1, date 2) function returns the number of months between two dates: months_between('01-FEB-2008','01-JAN-2008') = 1 The DECODE Function Although its name sounds mysterious, this function is straightforward. The DECODE function implements if then-else conditional logic by testing its first two terms for equality and returns the third if they are equal and optionally returns another term if they are not. DECODE Function Facilitates conditional inquiries by doing the work of a CASE expression or an IF-THENELSE statement: DECODE(col|expression, search1, result1 [, search2, result2,...,] [, default]) DECODE Function The DECODE function decodes an expression in a way similar to the IF-THEN-ELSE logic that is used in various languages. The DECODE function decodes expression after comparing it to each search value. If the expression is the same as search, result is returned. 

If the default value is omitted, a null value is returned where a search value does not match any of the result values. 


Q147. - (Topic 1) 

Which two statements are true about constraints? (Choose two.) 

A. The UNIQUE constraint does not permit a null value for the column. 

B. A UNIQUE index gets created for columns with PRIMARY KEY and UNIQUE constraints. 

C. The PRIMARY KEY and FOREIGN KEY constraints create a UNIQUE index. 

D. The NOT NULL constraint ensures that null values are not permitted for the column. 

Answer: B,D 

Explanation: 

B: A unique constraint can contain null values because null values cannot be compared to anything. 

D: The NOT NULL constraint ensure that null value are not permitted for the column 

Incorrect Answer: Astatement is not true Cstatement is not true 

Refer: Introduction to Oracle9i: SQL, Oracle University Study Guide, 10-9 


Q148. - (Topic 2) 

You are granted the CREATE VIEW privilege. What does this allow you to do? 

A. Create a table view. 

B. Create a view in any schema. 

C. Create a view in your schema. 

D. Create a sequence view in any schema. 

E. Create a view that is accessible by everyone. 

F. Create a view only of it is based on tables that you created. 

Answer:

Explanation: 

You can create a view in your own schema only if you are granted the CREATE VIEW 

privilege. 

Incorrect Answers 

A:You can create a view in your own schema only. 

B:You can create a view in your own schema only, not in any schema. 

D:There is no sequence view in Oracle. 

E:You cannot create a view that is accessible by everyone. You will need specially grant 

SELECT privileges on this view for everyone. 

F:You can create a view in your own schema, but not only for tables in your schema. You 

can use object from other users schemas if you have privileges to retrieve data from them. 

OCP Introduction to Oracle 9i: SQL Exam Guide, Jason Couchman, p. 292-301 

Chapter 7: Creating Other Database Objects in Oracle 


Q149. - (Topic 2) 

Examine the data in the ORD_ITEMS table: 

ORD_NO ITEM_NO QTY 

1 111 10 

1 222 20 

1 333 30 

2 333 30 

2 444 40 

3 111 40 

Evaluate the following query: 

SQL>SELECT item_no, AVG(qty) 

FROM ord_items 

HAVING AVG(qty) > MIN(qty) * 2 

GROUP BY item_no; 

Which statement is true regarding the outcome of the above query? 

A. It gives an error because the HAVING clause should be specified after the GROUP BY clause. 

B. It gives an error because all the aggregate functions used in the HAVING clause must be specified in the SELECT list. 

C. It displays the item nos with their average quantity where the average quantity is more than double the minimum quantity of that item in the table. 

D. It displays the item nos with their average quantity where the average quantity is more than double the overall minimum quantity of all the items in the table. 

Answer:


Q150. - (Topic 2) 

Which two statements are true regarding the DELETE and TRUNCATE commands? (Choose two.) 

A. DELETE can be used to remove only rows from only one table at a time. 

B. DELETE can be used to remove only rows from multiple tables at a time. 

C. DELETE can be used only on a table that is a parent of a referential integrity constraint. 

D. DELETE can be used to remove data from specific columns as well as complete rows. 

E. DELETE and TRUNCATE can be used on a table that is a parent of a referential integrity constraint having ON DELETE rule. 

Answer: A,E 

Explanation: 

Transactions, consisting of INSERT, UPDATE, and DELETE (or even MERGE) commands can be made permanent (with a COMMIT) or reversed (with a ROLLBACK). A TRUNCATE command, like any other DDL command, is immediately permanent: it can never be reversed. The Transaction Control Statements A transaction begins implicitly with the first DML statement. There is no command to explicitly start a transaction. The transaction continues through all subsequent DML statements issued by the session. These statements can be against any number of tables: a transaction is not restricted to one table. It terminates (barring any of the events listed in the previous section) when the session issues a COMMIT or ROLLBACK command. The SAVEPOINT command can be used to set markers that will stage the action of a ROLLBACK, but the same transaction remains in progress irrespective of the use of SAVEPOINT Explicit Transaction Control Statements You can control the logic of transactions by using the COMMIT, SAVEPOINT, and ROLLBACK statements. Note: You cannot COMMIT to a SAVEPOINT. SAVEPOINT is not ANSI-standard SQL. 

untitled