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-001





Question ID 8128

Examine Code: 1. DECLARE 2. i NUMBER := 0; 3. v_date DATE ; 4. BEGIN 5. i := i + 1; 6. LOOP 7. i := v_date + 5; 8. i := i + 1; 9. EXIT WHEN i = 5; 10. END LOOP; 11. END You have encountered the unexpected results when above block of code is executed. How can u trace the values of counter variable i and date variable v_date in SQL* PLUS environment?

Option A

By setting SQL* PLUS session variable DEBUGGER=TRUE

Option B

By inserting the statement DBMS_OUTPUT.PUT_LINE (i , v_date); Between lines 8-9

Option C

By inserting the statement DBMS_OUTPUT.DEBUG_VAR (i , v_date); Between lines 8-9

Option D

By inserting the statement DBMS_OUTPUT.PUT_LINE (i | | ``| | TO_CHAR( v_date)); Between lines 8-9

Correct Answer D
Explanation Explanation/Reference: Explanation: Answer D is correct because parameter of function PUT_LINE of DBMS_OUTPUT has type VARCHAR2. Usage of function TO_CHAR and concatenation of strings with '||' will allow this function to show trace data successfully. Incorrect Answers: A: There is no variable DEBUGGER in SQL * PLUS, only DEBUG. And usage of this variable will not help to determine what causes error inside the statement. B: Function PUT_LINE does not work with two parameters, only with one. C: There is no DEBUG_VAR function inside the DBMS_OUTPUT package. Oracle 8, DBA Certification Exam Guide, Jason S. Couchman, p. 210 Chapter 5: Introducing PL/SQL


Question ID 8129

Examine code:

SET SERVEROUTPUT ON

DECLARE

 v_name emp.ename%TYPE;

v_num NUMBER;

v_sal NUMBER(8,2);

BEGIN

--- This code displays salaries if larger than 10,000.

SELECT ename, sal

INTO v_name, v_sal

FROM emp

WHERE empno=101;

IF(v_sal.GT.10000) THEN

DBMS_OUTPUT.PUT_LINE('Salary is '||' v_sal

|| 'for employee' || v_name);

END IF;

END

SET SERVER OUTPUT OF

This statement produces a compilation error when above PL/SQL block is executed?

Option A

v_num NUMBER;

Option B

v_name emp.ename%TYPE;

Option C

IF (v_sal.GT.10000) THEN

Option D

---- This code displays salaries if larger than 10000.

Option E

SELECT ename, sal INTO v_name, v_sal FROM emp WHERE empno=101;

Correct Answer C
Explanation Explanation/Reference: Explanation: Answer C is correct because condition inside IF-THEN construction need to use ">", "<", "=" to compare actual value of v_sal variable with value 10000. Incorrect Answers: A: Definition is correct, v_num will use default settings for NUMBER type. B: Definition of v_name variable is correct, it has the same type as column ENAME in EMP table. D: Usage of comment inside of PL/SQL block is correct. Oracle 8, DBA Certification Exam Guide, Jason S. Couchman, p. 215-217 Chapter 5: Introducing PL/SQL

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