PL/SQL exam questions
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: PL/SQL exam questions

  1. #1
    Join Date
    Nov 2000
    Posts
    43
    Hello!

    These are the questions that I saw on pl/sql exam.But, I am still not sure what the corret answers are. Any Help??

    1)7. EVALUATE THIS IF STATEMENT

    IF V_VALUE > 100 THEN
    V_NEW_VALUE := 2 * V_VALUE
    ELSEIF V_VALUE >200 THEN
    V_NEW_VALUE := 3 * V_VALUE
    ELSEIF V_VALUE >300 THEN
    V_NEW_VALUE := 4 * V_VALUE
    ELSE
    V_NEW_VALUE := 4 * V_VALUE
    ENDIF;

    WHAT VALUE BE ASSIGNED TO V_NEW_VALUE IF V_VALUE = 250:

    My Ans: 500

    16. EVALUATE THIS PL/SQL BLOCK

    BEGIN
    FOR I IN 1..10 LOOP
    IF I=4 OR I=6 THEN NULL;
    ELSE
    INSERT INTO TEST(RESULT) VALUES(1);
    END;
    COMMIT;
    END LOOP;
    ROLL BACK;
    END;

    HOW MANY VALUES WILL BE INSERTED INTO THE TEST TABLE ?

    my ans: 8

    83. EXAMINE THIS CODE

    SELECT EMPLOYEE.ENAME
    FROM EMPLOYEE
    WHERE EMPLOYEE.ENAME NOT IN (SELECT MANAGER.MGR FROM EMP.MANAGER);

    WHAT IS NOT AN OPERATOR FOR EQUIVALENT TO THE ABOVE PARA
    1) !=
    2)!= ALL
    3)...

    38. GIVE THIS EXECUTABLE SECTION OF THE PL/SQL BLOCK

    BEGIN
    FOR EMPLOYEE_RECORD IN SALARY_CURSOR
    LOOP
    EMPLOYEE_ID_TABLE(EMPLOYEE) := EMPLOYEE_RECORD.LAST_NAME;
    ENDLOOP
    CLOSE SALARY_CURSOR;
    END;

    WHY DOES THIS SECTION CAUSE AN ERROR

    my ANS: THE CURSOR DOES NOT NEED TO BE EXPLICITY CLOSED.


    which table name is valid?
    1. #667
    2. number
    3. catch_#22
    4. 1996_invoices
    5. invoices-1996

    :confused:

  2. #2
    Join Date
    Oct 2001
    Location
    Toronto, Canada
    Posts
    236
    7. 500
    16. 8
    83. not sure if question is worded correctly. I would answer 2
    38. Cursor is not declared. Record is ot declared. cursor does not need to be closed. The answer depends on teh choices given.

    catch_#22 is a vakid table name.
    Leo
    Oracle 8i OCP DBA
    Toronto, Canada

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width