Exam 1z0-149 All QuestionsBrowse all questions from this exam
Question 34

Examine this anonymous block of code:

Which two statements are true about the results of executing it? (Choose two.)

    Correct Answer: E, F

    On examining the code, it is clear that v_raise is declared but not initialized to any value. In PL/SQL, an uninitialized variable defaults to NULL. Consequently, the expression salary + v_raise results in NULL since any arithmetic operation involving NULL yields NULL, setting all salaries to NULL if the code executes successfully. Therefore, statement E is correct. Additionally, since v_raise is not explicitly initialized before its use, it will indeed cause a runtime error as NULL is not a valid value for arithmetic operations in this context, making F also correct.

Discussion
jm9999

Is setting v_raise to null equivalent to initializing v_raise?

egznrdOptions: CE

I think C and E are correct

AlCoholic69

C is a trap because yes any sql might fail if invoking user doesn't have privilege. But D is correct because all variables are inistialized to NULL. E is correct because anything + null is null

mattiamarraffaOptions: DE

D and E are correct