PL/SQL - Conditions (Decision Making) MCQ Questions & Answers
Conditions (Decision Making) MCQs : This section focuses on "Conditions (Decision Making)" in Pl/Sql. These Multiple Choice Questions (MCQ) should be practiced to improve the Pl/Sql skills required for various interviews (campus interview, walk-in interview, company interview), placements, entrance exams and other competitive examinations.
1. The __________ associates a condition with a sequence of statements enclosed by the keywords THEN and END IF.
View Answer
2. What is output for the following code?
BEGIN
a:= 10;
IF( a < 20 ) THEN
dbms_output.put_line('a is less than 20 ' );
END IF;
dbms_output.put_line('value of a is : ' || a);
END;
View Answer
3. What is output for the following code?
BEGIN
a := 100;
IF( a < 20 ) THEN
dbms_output.put_line('a is less than 20 ' );
ELSE
dbms_output.put_line('a is not less than 20 ' );
END IF;
END;
View Answer
4. Which of the following is true?
View Answer
5. The CASE statement selects one sequence of statements to execute.
View Answer
6. What is output for the following code?
DECLARE
grade char(1) := 'A';
BEGIN
CASE grade
when 'A' then dbms_output.put_line('Excellent');
when 'B' then dbms_output.put_line('Very good');
when 'C' then dbms_output.put_line('Well done');
when 'D' then dbms_output.put_line('You passed');
when 'F' then dbms_output.put_line('Better try again');
else dbms_output.put_line('No such grade');
END CASE;
END;
View Answer
7. CASE statement uses which keyword to work like IF statement?
View Answer
8. What are the selectors in case of CASE statement?
View Answer
9. In which Oracle does the PL/SQL Continue Statement is supported?
View Answer
10. The searched CASE statement has no selector and the WHEN clauses of the statement contain search conditions that give Boolean values.
View Answer
Discussion