SQL (Structured Query Language) Question:

Download Job Interview Questions and Answers PDF

Examine this function:

SQL Interview Question
SQL Interview Question

Answer:

61. CREATE OR REPLACE FUNCTION set_budget
62. (v_studio_id IN NUMBER, v_new_budget IN NUMBER) IS
63. BEGIN
64. UPDATE studio
65. SET yearly_budget = v_new_budget
WHERE id = v_studio_id;

IF SQL%FOUND THEN
RETURN TRUEl;
ELSE
RETURN FALSE;
END IF;

COMMIT;
END;

Which code must be added to successfully compile this function?
1. Add RETURN right before the IS keyword.
2. Add RETURN number right before the IS keyword.
3. Add RETURN boolean right after the IS keyword.
4. Add RETURN boolean right before the IS keyword.

Download SQL Interview Questions And Answers PDF

Previous QuestionNext Question
The CHECK_THEATER trigger of the THEATER table has been disabled. Which command can you issue to enable this trigger?Under which circumstance must you recompile the package body after recompiling the package specification?