Examine this anonymous block of code:
Which two statements are true about the results of executing it? (Choose two.)
Examine this anonymous block of code:
Which two statements are true about the results of executing it? (Choose two.)
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.
Is setting v_raise to null equivalent to initializing v_raise?
I think C and E are correct
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
D and E are correct