Loading ...
Global Do...
News & Politics
4
0
Try Now
Log In
Pricing
Examsoon.com The World Renowned IT Certification Material Provider Exam : Oracle 1Z0-001 Title : INTRODUCTION TO ORACLE: SQL AND PL/SQL Version : Demo Examsoon.com The World Renowned IT Certification Material Provider Important Note, Please Read Carefully Other examsoon products All examsoon IT Exam Products Our products of Offline Testing Engine Use the offline Testing engine product to practice the questions in an exam environment. Build a foundation of knowledge which will be useful also after passing the exam. examsoon Testing Engine Guarantee Examsoon provides the most competitive quality of all exams for the customers, we guarantee your success at the first attempt with only our Certification Question&Answers, if you do not pass the exam at the first time, we will not only arrange FULL REFUND for you, but also provide you another exam of your claim, ABSOLUTELY FREE!. Features 1. Comprehensive questions with complete details 2. Instant Downloadable in PDF form. 3. Verified Answers Researched by Industry Experts 4. Questions accompanied by exhibits 5. Drag and Drop questions as experienced in the Actual Exams. 6. These questions and answers are backed by our GUARANTEE. 7. Questions updated on regular basis. 8. Like actual certification exams our product is in multiplechoice questions (MCQs). ExamSoon.com The World Renowned IT Certification Material Provider Help you pass any IT Exams 1. Click on the EXHIBIT button and examine the table instance chart for the cars table. Which SELECT statement will display style, color, and lot number for all cars based on the model entered at the prompt, regardless of case? A. SELECT style, color, lot_no FROM cars WHERE model = UPPER('&model'); B. SELECT style, color, lot_no FROM cars WHERE model = '&model'; C. SELECT style, color, lot_no FROM cars WHERE UPPER(model) = UPPER('&model'); D. SELECT style, color, lot_no FROM cars WHERE UPPER(model) = '&model'; Answer: C 2. Click on the EXHIBIT button and examine the table instance chart for the patient table. You need to create the patient_id_seq sequence to be used with the patient table's primary key column. The sequence should begin at 1000, have a maximum value of 999999999, never reuse any numbers, and increment by 1. Which statement would you use to complete this task? ExamSoon.com The World Renowned IT Certification Material Provider Help you pass any IT Exams A. CREATE SEQUENCE patient_id_seq START WITH 1000 MAXVALUE 999999999 NOCYCLE; B. CREATE SEQUENCE patient_id_seq START WITH 1000 MAXVALUE 999999999 STEP BY 1; C. CREATE SEQUENCE patient_id_seq ON patient (patient_id) MINVALUE 1000 MAXVALUE 999999999 INCREMENT BY 1 NOCYCLE; D. This task cannot be accomplished. Answer: A 3. You issue this command: CREATE SYNONYM emp FOR ed.employee; Which task has been accomplished? A. The need to qualify an object name with its schema was eliminated for user Ed. B. The need to qualify an object name with its schema was eliminated for only you. C. The need to qualify an object name with its schema was eliminated for all users. D. The need to qualify an object name with its schema was eliminated for users with access. Answer: B ExamSoon.com The World Renowned IT Certification Material Provider Help you pass any IT Exams 4. Click on the EXHIBIT button and examine the structure of the DEPARTMENT and EMPLOYEE tables. Evaluate this SQL statement: CREATE INDEX emp_dept_id_idx ON employee(dept_id); Which result will the statement provide? A. Store an index in the EMPLOYEE table. B. Increase the chance of full table scans. C. May reduce the amount of disk I/O for SELECT statements. D. May reduce the amount of disk I/O for INSERT statements. E. Override the unique index created when the FK relationship was defined. Answer: C 5. Which should you do after each FETCH statement in a PL/SQL block? A. Open the cursor. B. Close the cursor. C. Initialize the loop. D. Test for rows using a cursor attribute. Answer: D 6. Given this executable section of a PL/SQL block: BEGIN FOR employee_record IN salary_cursor LOOP employee_id_table(employee_id) := employee_record.last_name; END LOOP; CLOSE salary_cursor; END; Why does this section cause an error? A. The cursor needs to be opened. B. No FETCH statements were issued. C. Terminating conditions are missing. D. The cursor does not need to be closed. ExamSoon.com The World Renowned IT Certification Material Provider Help you pass any IT Exams Answer: D 7. The structure of the DEPT table is as follows: Name Null? Type ------------------------------- -------- ------- DEPTNO NOT NULL NUMBER(2) DNAME VARCHAR2(14) LOC VARCHAR2(13) Examine the code: DECLARE TYPE dept_record_type IS RECORD (dno NUMBER, name VARCHAR2(20)); dept_rec dept_record_type; BEGIN SELECT deptno, dname INTO dept_rec FROM dept WHERE deptno = 10; END; Which statement displays the name of the selected department? A. DBMS_OUTPUT.PUT_LINE(name); B. DBMS_OUTPUT.PUT_LINE(dname); C. DBMS_OUTPUT.PUT_LINE(dept_rec.name); D. DBMS_OUTPUT.PUT_LINE(dept_rec.dname); E. DBMS_OUTPUT.PUT_LINE(dept_rec(name)); Answer: C 8. The EMPLOYEE table contains these columns: BONUSNUMBER(7,2) DEPT_ID NUMBER(9) There are 10 departments and each department has at least 1 employee. Bonus values are greater than 500; not all employees receive a bonus. Evaluate this PL/SQL block: DECLARE v_bonusemployee.bonus%TYPE := 300; BEGIN ExamSoon.com The World Renowned IT Certification Material Provider Help you pass any IT Exams UPDATE employee SET bonus = bonus + v_bonus WHERE dept_id IN (10, 20, 30); COMMIT; END; What will be the result? A. All employees will be given a 300 bonus. B. A subset of employees will be given a 300 bonus. C. All employees will be given a 300 increase in bonus. D. A subset of employees will be given a 300 increase in bonus. Answer: D 9. Evaluate this IF statement: IF v_value > 100 THEN v_new_value := 2 * v_value; ELSIF v_value > 200 THEN v_new_value := 3 * v_value; ELSIF v_value < 300 THEN v_new_value := 4 * v_value; ELSE v_new_value := 5 * v_value; END IF; What would be assigned to V_NEW_VALUE if V_VALUE is 250? A. 250 B. 500 C. 750 D. 1000 E. 1250 Answer: B 10. Which ALTER command would you use to reinstate a disabled primary key constraint? A. ALTER TABLE cars ENABLE PRIMARY KEY (id); B. ALTER TABLE cars ENABLE CONSTRAINT cars_id_pk; C. ALTER TABLE cars ENABLE PRIMARY KEY (id) CASCADE; ExamSoon.com The World Renowned IT Certification Material Provider Help you pass any IT Exams D. ALTER TABLE cars ADD CONSTRAINT cars_id_pk PRIMARY KEY (id); Answer: B 11. You need to perform a major update on the EMPLOYEE table. You have decided to disable the PRIMARY KEY constraint on the empid column and the CHECK constraint on the job column. What happens when you try to enable the constraints after the update is completed? A. You need to recreate the constraints once they are disabled. B. Any existing rows that do not confirm with the constraints are automatically deleted. C. Only the future values are verified to confirm with the constraints, leaving the existing values unchecked. D. The indexes on both the columns with the PRIMARY KEY constraint and the CHECK constraint are automatically re-created. E. All the existing column values are verified to confirm with the constraints and an error message is generated if any existing values do not confirm. Answer: E 12. Which statement is valid within the executable section of a PL/SQL block? A. BEGIN emp_rec emp%ROWTYPE; END; B. WHEN NO_DATA_FOUND THEN DBMS_OUTPUT.PUT_LINE ('No records found'); C. SELECT ename, sal INTO v_ename, v_sal FROM emp WHERE empno = 101; D. PROCEDURE calc_max (n1 NUMBER,n2 NUMBER,p_max OUT NUMBER) IS BEGIN IF n1 > n2 THEN p_max := n1; ELSE p_max := n2; END; Answer: C 13. Examine this block of code: SET SERVEROUTPUT ON DECLARE ExamSoon.com The World Renowned IT Certification Material Provider Help you pass any IT Exams x NUMBER; v_sal NUMBER; v_found VARCHAR2(10) := 'TRUE'; BEGIN x := 1; v_sal := 1000; DECLARE v_found VARCHAR2(10); y NUMBER; BEGIN IF (v_sal > 500) THEN v_found := 'YES'; END IF; DBMS_OUTPUT.PUT_LINE ('Value of v_found is '|| v_found); DBMS_OUTPUT.PUT_LINE ('Value of v_sal is '|| v_sal); y := 20; END; DBMS_OUTPUT.PUT_LINE ('Value of v_found is '|| v_found); DBMS_OUTPUT.PUT_LINE ('Value of Y is '|| TO_CHAR(y)); END; SET SERVEROUTPUT OFF What is the result of executing this block of code? A. PLS-00201: identifier 'Y' must be declared B. Value of v_found is YES Value of v_sal is 1000 Value of v_found is TRUE C. Value of v_found is YES Value of v_sal is 1000 Value of v_found is YES Value of Y is 20 D. PLS-00201: identifier 'v_sal' must be declared PLS-00201: identifier 'Y' must be declared E. Value of v_found is YES Value of v_sal is 1000 Value of v_found is TRUE ExamSoon.com The World Renowned IT Certification Material Provider Help you pass any IT Exams Value of Y is 20 Answer: A 14. Examine this block of code: SET SERVEROUTPUT ON DECLARE x NUMBER; v_sal NUMBER; v_found VARCHAR2(10) := 'TRUE'; BEGIN x := 1; v_sal := 1000; DECLARE v_found VARCHAR2(10); y NUMBER; BEGIN IF (v_sal > 500) THEN v_found := 'YES'; END IF; DBMS_OUTPUT.PUT_LINE ('Value of v_found is '|| v_found); DBMS_OUTPUT.PUT_LINE ('Value of v_sal is '|| v_sal); y := 20; END; DBMS_OUTPUT.PUT_LINE ('Value of v_found is '|| v_found); DBMS_OUTPUT.PUT_LINE ('Value of Y is '|| TO_CHAR(y)); END; SET SERVEROUTPUT OFF Why does this code produce an error when executed? A. The value of V_FOUND cannot be 'YES'. B. Variable V_FOUND is declared at more than one location. C. Variable Y is declared in the inner block and referenced in the outer block. D. Variable V_SAL is declared in the outer block and referenced in the inner block. Answer: C 15. Examine the declaration section: DECLARE CURSOR emp_cursor(p_deptno NUMBER, p_job VARCHAR2) ExamSoon.com The World Renowned IT Certification Material Provider Help you pass any IT Exams IS SELECT empno, ename FROM emp WHERE deptno = p_deptno AND job = p_job; BEGIN ... Which statement opens this cursor successfully? A. OPEN emp_cursor; B. OPEN emp_cursor('Clerk', 10); C. OPEN emp_cursor(10,'Analyst'); D. OPEN emp_cursor(p_deptno, p_job); Answer: C 16. Your company wants to give each employee a $100 salary increment. You need to evaluate the results from the EMP table prior to the actual modification. If you do not want to store the results in the database, which statement is valid? A. You need to add a column to the EMP table. B. You need to give the arithmetic expression that involves the salary increment in the SET clause of the UPDATE statement. C. You need to give the arithmetic expression that involves the salary increment in the SELECT clause of the SELECT statement. D. You need to give the arithmetic expression that involves the salary increment in the UPDATE clause of the SELECT statement. E. You need to give the arithmetic expression that involves the salary increment in the DISPLAY clause of the SELECT statement. Answer: C 17. You need to execute a script file named QUERYEMP.SQL from your SQL*Plus environment. Which command do you use? A. RUN QUERYEMP B. GET QUERYEMP C. START QUERYEMP D. EXECUTE QUERYEMP Answer: C 18. The PRODUCT table contains these columns: ID NUMBER(9) PK ExamSoon.com The World Renowned IT Certification Material Provider Help you pass any IT Exams COST NUMBER(7,2) SALE_PRICE NUMBER(7,2) Management has asked you to calculate the net revenue per unit for each product if the cost of each product is increased by 10% and the sale price of each product is increased by 25%. You issue this SQL statement: SELECT id, sale_price * 1.25 - cost * 1.10 FROMproduct; Which conclusion can you draw from the results? A. Only the required results are displayed. B. The results provide more information than management requested. C. A function needs to be included in the SELECT statement to achieve the desired results. D. The order of the operations in the calculation needs to be changed to achieve the required results. Answer: A 19. You want to display the average salary for departments 20 and 50, but only if those departments have an average salary of at least 2000. Which statement will produce the required results? A. SELECT deptno, AVG(sal) FROM emp WHERE deptno IN (20, 50) GROUP BY deptno HAVING AVG(sal) >= 2000; B. SELECT deptno, AVG(sal) FROM emp GROUP BY deptno HAVING AVG(sal) >= 2000 AND deptno IN (20, 50); C. SELECT deptno, AVG(sal) FROM emp WHERE deptno IN (20, 50) AND AVG(sal) >= 2000 GROUP BY deptno; D. SELECT deptno, AVG(sal) FROM emp WHERE deptno IN (20, 50) GROUP BY AVG(sal) HAVING AVG(sal) >= 2000; ExamSoon.com The World Renowned IT Certification Material Provider Help you pass any IT Exams Answer: A 20. Click on the EXHIBIT button and examine the table instance chart for the cars table. You query the database with this command: SELECT lot_no "Lot Number", COUNT(*) "Number of Cars Available" FROM cars WHERE model = 'Fire' GROUP BY lot_no HAVING COUNT(*) > 10 ORDER BY COUNT(*); Which clause restricts which groups are displayed? A. SELECT lot_no "Lot Number", COUNT(*) "Number of Cars Available" B. WHERE model = 'Fire' C. HAVING COUNT(*) > 10 D. GROUP BY lot_no E. ORDER BY COUNT(*) Answer: C Examsoon.com was founded in 2006. The safer,easier way to help you pass any IT Certification exams . We provide high quality IT Certification exams practice questions and answers(Q&A). Especially Adobe, Apple, Citrix, Comptia, EMC, HP, Juniper, LPI, Nortel, Oracle, SUN, Vmware and so on. And help you pass any IT Certification exams at the first try. we guarantee your success at the first attempt with only our Certification Question&Answers, if you do not pass the exam at the first time, we will not only arrange FULL REFUND for you, but also provide you another exam of your claim, ABSOLUTELY FREE! You can reach us at any of the email addresses listed below. EMAIL: examsoon(at)hotmail.Com Examsoon.com The World Renowned IT Certification Material Provider