AllExam Dumps

DUMPS, FREE DUMPS, VCP5 DUMPS| VMWARE DUMPS, VCP DUMPS, VCP4 DUMPS, VCAP DUMPS, VCDX DUMPS, CISCO DUMPS, CCNA, CCNA DUMPS, CCNP DUMPS, CCIE DUMPS, ITIL, EXIN DUMPS,


READ Free Dumps For Oracle- 1z0-007





Question ID 7905

You need to create a view EMP_VU. The view should allow the users to manipulate the records of only the employees that are working for departments 10 or 20. Which SQL statement would you use to create the view EMP_VU?

Option A

CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20);

Option B

CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH READ ONLY;

Option C

CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH CHECK OPTION;

Option D

CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20);

Option E

CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) NO UPDATE;

Correct Answer C
Explanation Explanation/Reference: Explanation: Tables that underlie views often have constraints that limit the data that can be added to those tables. Views cannot add data to the underlying table that would violate the table's constraints. However, you can also define a view to restrict the user's ability to change underlying table data even further, effectively placing a special constraint for data manipulation through the view. This additional constraint says that INSERT or UPDATE statements issued against the view are cannot create rows that the view cannot subsequently select. This constraint is configured when the view is defined by adding the WITH CHECK OPTION to the CREATE VIEW statement. Incorrect Answers A: This view does not provide correct semantic of question task. B: WITH READ ONLY clause is incorrect syntax in the CREATE VIEW command. D: This view does not provide correct semantic of question task. E: NO UPDATE clause is incorrect syntax in the CREATE VIEW command. OCP Introduction to Oracle 9i: SQL Exam Guide, Jason Couchman, p. 301-303 Chapter 7: Creating Other Database Objects in Oracle


Question ID 7906

Examine the structure of the STUDENTS table: STUDENT_ID NUMBER NOT NULL, Primary Key STUDENT_NAME VARCHAR2(30) COURSE_ID VARCHAR2(10) NOT NULL MARKS NUMBER START_DATE DATE FINISH_DATE DATE You need to create a report of the 10 students who achieved the highest ranking in the course INT SQL and who completed the course in the year 1999. Which SQL statement accomplishes this task?

Option A

SELECT student_ id, marks, ROWNUM "Rank" FROM students WHERE ROWNUM <= 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99' AND course_id = 'INT_SQL' ORDER BY marks DESC;

Option B

SELECT student_id, marks, ROWID "Rank" FROM students WHERE ROWID <= 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99' AND course_id = 'INT_SQL' ORDER BY marks;

Option C

SELECT student_id, marks, ROWNUM "Rank" FROM (SELECT student_id, marks FROM students WHERE ROWNUM <= 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99' AND course_id = 'INT_SQL' ORDER BY marks DESC);

Option D

SELECT student_id, marks, ROWNUM "Rank" FROM (SELECT student_id, marks FROM students ORDER BY marks DESC) WHERE ROWNUM <= 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99' AND course _ id ='INT _ SQL';

Correct Answer D
Explanation Explanation/Reference: Explanation: This statement using inline sub-query will provide correct results to show 10 students who achieved the highest ranking in the course INT SQL and who completed the course in the year 1999. Incorrect Answers A: This view will just show first 10 students from the STUDENTS table with limitation on the course INT SQL and who completed the course in the year 1999. B: It's wrong to use here ROWID to achieve desired results. C: This statement will provide wrong result due to wrong conditions in the inline sub-query. OCP Introduction to Oracle 9i: SQL Exam Guide, Jason Couchman, p. 162-165 Chapter 4: Subqueries

Send email to admin@getfreedumps for new dumps request!!!