It is more faster and easier to pass the Oracle 1z0 051 practice test exam by using Downloadable Oracle Oracle Database: SQL Fundamentals I questuins and answers. Immediate access to the Up to date 1z0 051 latest dumps free download pdf Exam and find the same core area 1z0 051 dumps pdf questions with professionally verified answers, then PASS your exam with a high score now.


♥♥ 2017 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

Q151. - (Topic 2) 

Evaluate the SQL statement: 

SELECT ROUND(45.953, -1), TRUNC(45.936, 2) 

FROM dual; 

Which values are displayed? 

A. 46 and 45 

B. 46 and 45.93 

C. 50 and 45.93 

D. 50 and 45.9 

E. 45 and 45.93 

F. 45.95 and 45.93 

Answer:

Explanation: 

ROUND (45.953,-1) will round value to 1 decimal places to the left. TRUNC (45.936,2) will truncate value to 2 decimal The answer will be 50 and 45.93 

Incorrect Answers : 

A. Does not meet round and truncate functions 

B. Does not meet round functions 

D. Does not meet truncate functions 

E. Does not meet round functions 

F. Does not meet round functions 

Refer: Introduction to Oracle9i: SQL, Oracle University Student Guide, Single-Row functions, p. 3-13 


Q152. - (Topic 2) 

Examine the structure proposed for the TRANSACTIONS table: 

Which two statements are true regarding the storage of data in the above table structure? (Choose two.) 

A. The TRANS_DATE column would allow storage of dates only in the dd-mon-yyyy format. 

B. The CUST_CREDIT_VALUE column would allow storage of positive and negative integers. 

C. The TRANS_VALIDITY column would allow storage of a time interval in days, hours, minutes, and seconds. 

D. The CUST_STATUS column would allow storage of data up to the maximum VARCHAR2 size of 4,000 characters. 

Answer: B,D 

Explanation: 

B: The NUMBER datatype stores fixed and floating-point numbers. Numbers of virtually 

any magnitude can be stored and are guaranteed portable among different systems 

operating Oracle, up to 38 digits of precision. 

The following numbers can be stored in a NUMBER column: 

Positive numbers in the range 1 x 10-130 to 9.99...9 x 10125 with up to 38 significant digits Negative numbers from -1 x 10-130 to 9.99...99 x 10125 with up to 38 significant digits Zero Positive and negative infinity (generated only by importing from an Oracle Version 5 database) 

D: The VARCHAR2 datatype stores variable-length character strings. When you create a table with a VARCHAR2 column, you specify a maximum string length (in bytes or characters) between 1 and 4000 bytes for the VARCHAR2 column. An interval literal specifies a period of time, and Oracle supports two types of interval literals: YEAR_TO_MONTH and DAY TO SECOND. For DAY TO SECOND, you can specify these differences in terms in terms of days, hours, minutes, and seconds. DAY TO SECOND contains a leading field and may contain an optional trailing field. If trailing field is specified it must be less significant than the leading field. For example, INTERVAL MINUTE TO DAY is not valid. 

A DAY TO MINUTE interval considers an interval of days to the nearest minute. Reference: Oracle Database Concepts 10g, Native Datatypes 


Q153. - (Topic 2) 

Which two statements complete a transaction? (Choose two) 

A. DELETE employees; 

B. DESCRIBE employees; 

C. ROLLBACK TO SAVEPOINT C; 

D. GRANT SELECT ON employees TO SCOTT; 

E. ALTER TABLE employeesSET UNUSED COLUMN sal; 

F. Select MAX(sal)FROM employeesWHERE department_id = 20; 

Answer: D,E 

Explanation: 

D: GRANT is a DML operation which will cause an implicit commit 

E: It is important to understand that an implicit COMMIT occurs on the database when a user exits SQL*Plus or issues a data-definition language (DDL) command such as a CREATE TABLE statement, used to create a database object, or an ALTER TABLE statement, used to alter a database object. 

Incorrect Answers A:The DELETE command is data-manipulation language (DML) command and it does not complete a transaction. B:The DESCRIBE command is internal SQL*Plus command and it has nothing to do with completion a transaction. 

C: ROLLBACK is not used to commit or complete a transaction, it is used to undo a transaction F:SELECT command is used to retrieve data. It does not complete a transaction. 

OCP Introduction to Oracle 9i: SQL Exam Guide, Jason Couchman, p. 281-282 Chapter 3: Advanced Data Selection in Oracle 


Q154. - (Topic 1) 

View the Exhibit and examine the structure of the PROMOTIONS table. Which SQL statements are valid? (Choose all that apply.) 

A. SELECT promo_id. DECODE(NVL(promo_cost.O).promo_cost * 0.25. 100) "Discount" 

FROM promotions; 

B. SELECT promo id. DECODE(promo_cost. 10000. 

DECODE(promo_category. 'Gl\\ promo_cost * 25. NULL). NULL) "Catcost" FROM 

promotions; 

C. SELECT promo_id. DECODE(NULLIF(promo_cost. 10000). NULL. promo_cost*.25, 

*N/A') "Catcost" 

FROM promotions; 

D. SELECT promo_id. DECODE(promo_cost. >10000. 'High'. <10000. 'Low') 

"Range"FROM promotions; 

Answer: A,B 

Explanation: 

Note: there are some syntax issues in this question. 


Q155. - (Topic 1) 

Which statements are correct regarding indexes? (Choose all that apply.) 

A. For each data manipulation language (DML) operation performed, the corresponding indexes are automatically updated. 

B. A nondeferrable PRIMARY KEY or UNIQUE KEY constraint in a table automatically creates a unique index. 

C. A FOREIGN KEY constraint on a column in a table automatically creates a non unique key 

D. When a table is dropped, the corresponding indexes are automatically dropped 

Answer: A,B,D 


Q156. - (Topic 2) 

You need to write a SQL statement that returns employee name, salary, department ID, and maximum salary earned in the department of the employee for all employees who earn less than the maximum salary in their department. 

Which statement accomplishes this task? 

A. SELECT a.emp_name, a.sal, b.dept_id, MAX(sal) FROM employees a, departments b WHERE a.dept_id = b.dept_id AND a.sal < MAX(sal) GROUP BY b.dept_id; 

B. SELECT a.emp_name, a.sal, a.dept_id, b.maxsal FROM employees a, (SELECT dept_id, MAX(sal) maxsal FROM employees GROUP BY dept_id) b WHERE a.dept_id = b.dept_id AND a.sal < b.maxsal; 

C. SELECT a.emp_name, a.sal, a.dept_id, b.maxsal FROM employees a WHERE a.sal < (SELECT MAX(sal) maxsal FROM employees b GROUP BY dept_id); 

D. SELECT emp_name, sal, dept_id, maxsal FROM employees, (SELECT dept_id, MAX(sal) maxsal FROM employees GROUP BY dept_id) WHERE a.sal < maxsal; 

Answer:

Explanation: function MAX(column_name) 

Incorrect Answer: 

Ainvalid statement 

Cinner query return more than one line 

Dcolumn maxsal does not exists. 

Refer: Introduction to Oracle9i: SQL, Oracle University Study Guide, 5-7 


Q157. - (Topic 1) 

The STUDENT_GRADES table has these columns: 

STUDENT_IDNUMBER(12) 

SEMESTER_ENDDATE 

GPANUMBER(4,3) 

The registrar has asked for a report on the average grade point average (GPA), sorted from the highest grade point average to each semester, starting from the earliest date. 

Which statement accomplish this? 

A. 

SELECT student_id, semester_end, gpa FROM student_grades ORDER BY semester_end DESC, gpa DESC; 

B. 

SELECT student_id, semester_end, gpa FROM student_grades ORDER BY semester_end, gpa ASC 

C. 

SELECT student_id, semester_end, gpa FROM student_grades ORDER BY gpa DESC, semester_end ASC; 

D. 

SELECT student_id, semester_end, gpa FROM student_grades ORDER BY gpa DESC, semester_end DESC; 

E. 

SELECT student_id, semester_end, gpa FROM student_grades ORDER BY gpa DESC, semester_end ASC; 

F. 

SELECT student_id,semester_end,gpa FROM student_grades ORDER BY semester_end,gpa DESC 

Answer:


Q158. - (Topic 1) 

Which three statements are true about multiple-row sub queries? (Choose three.) 

A. They can contain a subquery within a sub query. 

B. They can return multiple columns as well as rows. 

C. They cannot contain a sub query within a sub query. 

D. They can return only one column but multiple rows. 

E. They can contain group functions and GROUP BY and HAVING clauses. 

F. They can contain group functions and the GROUP BY clause, but not the HAVING clause. 

Answer: A,B,E 


Q159. - (Topic 2) 

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 


Q160. - (Topic 1) 

Which two statements are true regarding views? (Choose two.) 

A. A sub query that defines a view cannot include the GROUP BY clause 

B. A view is created with the sub query having the DISTINCT keyword can be updated 

C. A Data Manipulation Language (DML) operation can be performed on a view that is created with the sub query having all the NOT NULL columns of a table 

D. A view that is created with the sub query having the pseudo column ROWNUM keyword cannot be updated 

Answer: C,D 

Explanation: 

Rules for Performing DML Operations on a View You cannot add data through a view if the view includes: Group functions A GROUP BY clause The DISTINCT keyword The pseudocolumn ROWNUM keyword Columns defined by expressions NOT NULL columns in the base tables that are not selected by the view