What Will Be The Output Of The Following Plsql Codep Pre #636
What will be the output of the following PL/SQL code?</p> <pre><code class="language-sql">DECLARE a number(2) := 25; BEGIN IF (a < 10 ) THEN dbms_output.put_line('Value of a is less than 10' ); ELSEIF (a < 20) THEN dbms_output.put_line('Value of a is less than 20' ); ELSE dbms_output.put_line('Value of a is greater than 20'); END IF; dbms_output.put_line('Value of a is: '|| a ); END;</code></pre>
This multiple choice question (MCQ) is related to the book/course
gs gs115 Structured Query Language.
It can also be found in
gs gs115 PL/SQL Data Types and DBMS Output - PL/SQL DBMS Output - Quiz No.1.
What will be the output of the following PL/SQL code?
DECLARE a number(2) := 25; BEGIN IF (a < 10 ) THEN dbms_output.put_line('Value of a is less than 10' ); ELSEIF (a < 20) THEN dbms_output.put_line('Value of a is less than 20' ); ELSE dbms_output.put_line('Value of a is greater than 20'); END IF; dbms_output.put_line('Value of a is: '|| a ); END;
Value of a is less than 10 Value of a is 25Value of a is less than 20 Value of a is 25
Error
Value of a is greater than 20 Value of a is 25