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