Q6 . What is the value of v_found_flag when the following PL/SQL block is execut
ID: 3866791 • Letter: Q
Question
Q6. What is the value of v_found_flag when the following PL/SQL block is executed successfully?
DECLARE
v_n NUMBER;
v_found_flag BOOLEAN;
BEGIN
SELECT COUNT(*)
INTO v_n
FROM tab1
WHERE col_99 > 0;
v_found_flag := SQL%FOUND;
END;
A. The value is always NULL.
B. The value is NULL if and only if the tab1 table is empty.
C. The value is NULL if and only if the tab1 table is not empty.
D. The value is always FALSE.
E. The value is FALSE if and only if the tab1 table is empty.
F. The value is FALSE if and only if the tab1 table is not empty.
G. The value is always TRUE.
H. The value is TRUE if and only if the tab1 table is empty.
I. The value is TRUE if and only if the tab1 table is not empty.
Q7. Which guideline relates to a CURSOR FOR Loop?
FOR v_idx IN cursor_name LOOP
statement1;
statement2;
......
END LOOP;
A. The user must explicitly declare the v_idx in the DECLARATION section.
B. The cursor must return at least one row.
C. It does not require a FETCH statement.
D. All of the above
Q8. Evaluate the following CURSOR statement:
DECLARE
CURSOR c_1 (p_max_num NUMBER(3) := 500) IS
SELECT col_1, col_2, col_3
FROM tab1
WHERE col1_5 = p_max_num;
Why will this statement cause an error?
A. The default value (500) cannot be assigned to the p_max_num parameter.
B. The size (3) of the p_max_num parameter cannot be specified.
C. The SELECT statement is missing the INTO clause.
D. All of the above.
Q9. In a PL/SQL block, when a variable is declared as NOT NULL, you must initialize the variable when it is declared.
A. TRUE
B. FALSE
Explanation / Answer
Q6 The value is FALSE if and only if the the Table is Empty
Since the SQL % FOUND return NULL only no Data manipulation statement is wxecuted here Select Statement is there.
SQL%FOUND returns TRUE if the select statement is executed atleast once.
else returns FALSE
Q7:It does not require a FETCH statement.
Q8:The size (3) of the p_max_num parameter cannot be specified.
Q9:TRUE
When you declare a variable as NOT NULL then the value must be mentioned
Q8:
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.